Skip to content

Commit 823e31d

Browse files
committed
Update dependencies and refactor UI components to use DesignTheme. Removed reflect_colors package references and replaced them with Colors. Adjusted various UI elements to enhance consistency and appearance across the application.
1 parent 2aa67f9 commit 823e31d

File tree

46 files changed

+170
-409
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+170
-409
lines changed

apps/biyi_app/lib/app/available_ocr_engines/page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class _AvailableOcrEnginesPageState extends State<AvailableOcrEnginesPage> {
9696

9797
@override
9898
Widget build(BuildContext context) {
99-
return Scaffold(
99+
return PageScaffold(
100100
appBar: CustomizedAppBar(
101101
title: Text(
102102
t.app.ocr_engines.title,

apps/biyi_app/lib/app/available_translation_engines/page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class _AvailableTranslationEnginesPageState
100100

101101
@override
102102
Widget build(BuildContext context) {
103-
return Scaffold(
103+
return PageScaffold(
104104
appBar: CustomizedAppBar(
105105
title: Text(
106106
t.app.translation_engines.title,

apps/biyi_app/lib/app/home/desktop_popup.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ class _DesktopPopupPageState extends State<DesktopPopupPage>
908908
_handleButtonTappedTrans();
909909
},
910910
},
911-
child: Scaffold(
911+
child: PageScaffold(
912912
appBar: _buildAppBar(context),
913913
body: _buildBody(context),
914914
),

apps/biyi_app/lib/app/home/limited_functionality_banner.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import 'package:biyi_app/widgets/feature_status_icon/feature_status_icon.dart';
44
import 'package:bot_toast/bot_toast.dart';
55
import 'package:fluentui_system_icons/fluentui_system_icons.dart';
66
import 'package:flutter/gestures.dart';
7-
import 'package:reflect_colors/reflect_colors.dart';
87
import 'package:reflect_ui/reflect_ui.dart';
98
import 'package:screen_capturer/screen_capturer.dart';
109
import 'package:screen_text_extractor/screen_text_extractor.dart';
@@ -64,10 +63,10 @@ class AllowAccessListItem extends StatelessWidget {
6463
),
6564
],
6665
style: TextStyle(
67-
color: ReflectColors.neutral.shade700,
66+
color: Colors.neutral.shade700,
6867
decoration: TextDecoration.underline,
6968
decorationThickness: 1.5,
70-
decorationColor: ReflectColors.neutral.shade700,
69+
decorationColor: Colors.neutral.shade700,
7170
fontWeight: FontWeight.w700,
7271
fontSize: 13,
7372
height: 18 / 13,
@@ -124,7 +123,9 @@ class LimitedFunctionalityBanner extends StatelessWidget {
124123
child: Icon(
125124
FluentIcons.question_circle_20_regular,
126125
size: 14,
127-
color: hovered ? Colors.white70 : Colors.white,
126+
color: hovered
127+
? Colors.white.withOpacity(0.7)
128+
: Colors.white,
128129
),
129130
);
130131
},

apps/biyi_app/lib/app/home/new_version_found_banner.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class NewVersionFoundBanner extends StatelessWidget {
1515

1616
@override
1717
Widget build(BuildContext context) {
18-
TextTheme textTheme = Theme.of(context).textTheme;
18+
final DesignThemeData theme = DesignTheme.of(context);
1919
return Container(
2020
color: Theme.of(context).primaryColor,
2121
width: double.infinity,
@@ -40,7 +40,7 @@ class NewVersionFoundBanner extends StatelessWidget {
4040
version: latestVersion.version,
4141
),
4242
),
43-
style: textTheme.bodyMedium!.copyWith(
43+
style: theme.typography.bodyMedium.copyWith(
4444
color: Colors.white,
4545
fontWeight: FontWeight.w500,
4646
),
@@ -71,7 +71,7 @@ class NewVersionFoundBanner extends StatelessWidget {
7171
),
7272
],
7373
),
74-
style: textTheme.bodyMedium!.copyWith(
74+
style: theme.typography.bodyMedium.copyWith(
7575
color: Colors.white,
7676
),
7777
),

apps/biyi_app/lib/app/home/page.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import 'package:biyi_app/app/home/tab_settings.dart';
44
import 'package:biyi_app/app/home/tab_vocabulary.dart';
55
import 'package:fluentui_system_icons/fluentui_system_icons.dart';
66
import 'package:flutter/cupertino.dart';
7-
import 'package:reflect_colors/reflect_colors.dart';
87
import 'package:reflect_ui/reflect_ui.dart';
98
import 'package:uni_platform/uni_platform.dart';
109

@@ -45,7 +44,7 @@ class _HomePageState extends State<HomePage> {
4544
boxShadow: Theme.of(context).brightness == Brightness.light
4645
? [
4746
BoxShadow(
48-
color: ReflectColors.neutral.withOpacity(0.2),
47+
color: Colors.neutral.withOpacity(0.2),
4948
blurRadius: 16,
5049
),
5150
]
@@ -87,7 +86,7 @@ class _HomePageState extends State<HomePage> {
8786
}
8887

8988
Widget _build(BuildContext context) {
90-
return Scaffold(
89+
return PageScaffold(
9190
body: _buildBody(context),
9291
bottomNavigationBar: _buildBottomNavigationBar(context),
9392
);

apps/biyi_app/lib/app/home/tab_homepage.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class _TabHomepageSceneState extends State<TabHomepageScene> {
3333

3434
@override
3535
Widget build(BuildContext context) {
36-
return Scaffold(
36+
return PageScaffold(
3737
appBar: _buildAppBar(context),
3838
body: _buildBody(context),
3939
);

apps/biyi_app/lib/app/home/tab_vocabulary.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class TabVocabularyScene extends StatelessWidget {
66

77
@override
88
Widget build(BuildContext context) {
9-
return Scaffold(
9+
return PageScaffold(
1010
appBar: const CustomizedAppBar(
1111
title: Text('Vocabulary'),
1212
),

apps/biyi_app/lib/app/home/toolbar_item_always_on_top.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ class _ToolbarItemAlwaysOnTopState extends State<ToolbarItemAlwaysOnTop> {
3535
),
3636
child: IconButton(
3737
_isAlwaysOnTop ? FluentIcons.pin_20_filled : FluentIcons.pin_20_regular,
38-
variant: IconButtonVariant.transparent,
39-
padding: EdgeInsets.zero,
38+
variant: IconButtonVariant.plain,
39+
// padding: EdgeInsets.zero,
4040
color: _isAlwaysOnTop ? null : iconThemeData.color,
4141
onPressed: () {
4242
setState(() {

apps/biyi_app/lib/app/home/toolbar_item_settings.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class _ToolbarItemSettingsState extends State<ToolbarItemSettings> {
3232
final iconThemeData = Theme.of(context).iconTheme;
3333
return IconButton(
3434
FluentIcons.settings_20_regular,
35-
variant: IconButtonVariant.transparent,
35+
variant: IconButtonVariant.plain,
3636
color: iconThemeData.color,
3737
onPressed: _handleClick,
3838
);

0 commit comments

Comments
 (0)