reorganize app colors
This commit is contained in:
@@ -37,6 +37,7 @@ class TorProxyScreen extends HookConsumerWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final appColors = AppColors.of(context);
|
||||
final bootstrapProgress = ref.watch(
|
||||
torProxyServiceProvider.select(
|
||||
(value) => value.value?.bootstrapProgress ?? 0,
|
||||
@@ -125,7 +126,7 @@ class TorProxyScreen extends HookConsumerWidget {
|
||||
Set<WidgetState> states,
|
||||
) {
|
||||
if (states.isEmpty) {
|
||||
return AppColors.torBackgroundGrey;
|
||||
return appColors.torBackgroundGrey;
|
||||
}
|
||||
return null; // Use the default color.
|
||||
}),
|
||||
@@ -147,20 +148,20 @@ class TorProxyScreen extends HookConsumerWidget {
|
||||
fillColor: WidgetStateColor.resolveWith((states) {
|
||||
return Colors.white;
|
||||
}),
|
||||
checkColor: WidgetStateProperty.all(AppColors.torPurple),
|
||||
checkColor: WidgetStateProperty.all(appColors.torPurple),
|
||||
),
|
||||
iconTheme: const IconThemeData(color: Colors.white),
|
||||
),
|
||||
child: SafeArea(
|
||||
child: ColoredBox(
|
||||
color: AppColors.torPurple,
|
||||
color: appColors.torPurple,
|
||||
child: CustomScrollView(
|
||||
slivers: [
|
||||
SliverAppBar(
|
||||
pinned: true,
|
||||
title: SwitchListTile.adaptive(
|
||||
inactiveThumbColor: Colors.white,
|
||||
activeThumbColor: AppColors.torActiveGreen,
|
||||
activeThumbColor: appColors.torActiveGreen,
|
||||
thumbIcon: WidgetStateProperty.resolveWith<Icon?>((
|
||||
Set<WidgetState> states,
|
||||
) {
|
||||
@@ -199,8 +200,8 @@ class TorProxyScreen extends HookConsumerWidget {
|
||||
children: [
|
||||
if (torPendingRequest.value != false && torIsBusy)
|
||||
LinearProgressIndicator(
|
||||
backgroundColor: AppColors.torBackgroundGrey,
|
||||
color: AppColors.torActiveGreen,
|
||||
backgroundColor: appColors.torBackgroundGrey,
|
||||
color: appColors.torActiveGreen,
|
||||
value: bootstrapProgress / 100,
|
||||
),
|
||||
Padding(
|
||||
@@ -289,7 +290,7 @@ class TorProxyScreen extends HookConsumerWidget {
|
||||
|
||||
SwitchListTile.adaptive(
|
||||
inactiveThumbColor: Colors.white,
|
||||
activeThumbColor: AppColors.torActiveGreen,
|
||||
activeThumbColor: appColors.torActiveGreen,
|
||||
thumbIcon: WidgetStateProperty.resolveWith<Icon?>((
|
||||
Set<WidgetState> states,
|
||||
) {
|
||||
@@ -327,7 +328,7 @@ class TorProxyScreen extends HookConsumerWidget {
|
||||
),
|
||||
SwitchListTile.adaptive(
|
||||
inactiveThumbColor: Colors.white,
|
||||
activeThumbColor: AppColors.torActiveGreen,
|
||||
activeThumbColor: appColors.torActiveGreen,
|
||||
thumbIcon: WidgetStateProperty.resolveWith<Icon?>((
|
||||
Set<WidgetState> states,
|
||||
) {
|
||||
@@ -362,7 +363,7 @@ class TorProxyScreen extends HookConsumerWidget {
|
||||
if (torSettings.config == TorConnectionConfig.auto) ...[
|
||||
SwitchListTile.adaptive(
|
||||
inactiveThumbColor: Colors.white,
|
||||
activeThumbColor: AppColors.torActiveGreen,
|
||||
activeThumbColor: appColors.torActiveGreen,
|
||||
value: torSettings.requireBridge,
|
||||
contentPadding: const EdgeInsets.only(
|
||||
left: 56,
|
||||
|
||||
@@ -27,8 +27,9 @@ class TorDialog extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final appColors = AppColors.of(context);
|
||||
return AlertDialog(
|
||||
icon: const Icon(TorIcons.onionAlt, color: AppColors.torPurple),
|
||||
icon: Icon(TorIcons.onionAlt, color: appColors.torPurple),
|
||||
title: const Text('Tor™ Proxy'),
|
||||
content: const Text(
|
||||
'This container requires a Tor proxy for secure connections, which is not currently running.',
|
||||
|
||||
@@ -28,6 +28,8 @@ import 'package:weblibre/presentation/widgets/animate_gradient_shader.dart';
|
||||
class TorNotification extends HookConsumerWidget {
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final appColors = AppColors.of(context);
|
||||
|
||||
ref.listen(torProxyServiceProvider, (previous, next) {
|
||||
if (next.hasValue & next.requireValue.isRunning &&
|
||||
next.requireValue.bootstrapProgress == 100) {
|
||||
@@ -37,7 +39,7 @@ class TorNotification extends HookConsumerWidget {
|
||||
|
||||
return SafeArea(
|
||||
child: ColoredBox(
|
||||
color: AppColors.torPurple,
|
||||
color: appColors.torPurple,
|
||||
child: SizedBox(
|
||||
height: 56 + 12,
|
||||
width: MediaQuery.of(context).size.width,
|
||||
@@ -52,9 +54,9 @@ class TorNotification extends HookConsumerWidget {
|
||||
duration: const Duration(milliseconds: 500),
|
||||
primaryEnd: Alignment.bottomLeft,
|
||||
secondaryEnd: Alignment.topRight,
|
||||
primaryColors: const [
|
||||
AppColors.torActiveGreen,
|
||||
AppColors.torActiveGreen,
|
||||
primaryColors: [
|
||||
appColors.torActiveGreen,
|
||||
appColors.torActiveGreen,
|
||||
],
|
||||
secondaryColors: const [Colors.white, Colors.white],
|
||||
child: const Padding(
|
||||
@@ -87,8 +89,8 @@ class TorNotification extends HookConsumerWidget {
|
||||
);
|
||||
|
||||
return LinearProgressIndicator(
|
||||
backgroundColor: AppColors.torBackgroundGrey,
|
||||
color: AppColors.torActiveGreen,
|
||||
backgroundColor: AppColors.of(context).torBackgroundGrey,
|
||||
color: AppColors.of(context).torActiveGreen,
|
||||
value: bootstrapProgress / 100,
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user