From d927bf3cb88177879a5a7d3129aae801683cf7a5 Mon Sep 17 00:00:00 2001 From: Ming Ming Date: Wed, 14 Jul 2021 00:04:28 +0800 Subject: [PATCH] Replace cloud icon with https indicator --- lib/widget/home_app_bar.dart | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/widget/home_app_bar.dart b/lib/widget/home_app_bar.dart index c9daff03..7e7f6aad 100644 --- a/lib/widget/home_app_bar.dart +++ b/lib/widget/home_app_bar.dart @@ -36,9 +36,19 @@ class HomeSliverAppBar extends StatelessWidget { padding: const EdgeInsets.all(8), child: Row( children: [ - Icon( - Icons.cloud, - color: AppTheme.getCloudIconColor(context), + Stack( + children: [ + if (account.scheme == "http") + Icon( + Icons.no_encryption_outlined, + color: Colors.orange, + ) + else + Icon( + Icons.https, + color: Theme.of(context).colorScheme.primary, + ), + ], ), const SizedBox(width: 8), Expanded( @@ -46,7 +56,7 @@ class HomeSliverAppBar extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - account.url, + account.url.substring(account.scheme.length + 3), style: const TextStyle(fontSize: 16), ), Text(