Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hoc081098 committed Sep 3, 2024
1 parent fb2cc83 commit 5f423c6
Show file tree
Hide file tree
Showing 7 changed files with 295 additions and 157 deletions.
6 changes: 3 additions & 3 deletions lib/pages/home/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class _HomePageState extends State<HomePage>
label: const Text('Change password'),
icon: const Icon(Icons.lock_outline),
style: ElevatedButton.styleFrom(
backgroundColor: Theme.of(context).backgroundColor,
backgroundColor: Theme.of(context).colorScheme.surface,
),
),
),
Expand All @@ -99,7 +99,7 @@ class _HomePageState extends State<HomePage>
label: const Text('Logout'),
icon: const Icon(Icons.exit_to_app),
style: ElevatedButton.styleFrom(
backgroundColor: Theme.of(context).backgroundColor,
backgroundColor: Theme.of(context).colorScheme.surface,
),
),
),
Expand All @@ -111,7 +111,7 @@ class _HomePageState extends State<HomePage>
'Flutter auth BLoC pattern RxDart',
style: Theme.of(context)
.textTheme
.subtitle1!
.titleMedium!
.copyWith(fontSize: 16),
),
),
Expand Down
6 changes: 3 additions & 3 deletions lib/pages/home/home_profile_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class HomeUserProfile extends StatelessWidget {
const SizedBox(height: 4),
Text(
'Error',
style: themeData.textTheme.subtitle2!.copyWith(fontSize: 12),
style: themeData.textTheme.titleSmall!.copyWith(fontSize: 12),
),
],
),
Expand Down Expand Up @@ -140,7 +140,7 @@ class HomeUserProfile extends StatelessWidget {
Expanded(
child: Text(
'Logging out...',
style: Theme.of(context).textTheme.subtitle1,
style: Theme.of(context).textTheme.titleMedium,
textAlign: TextAlign.center,
),
),
Expand Down Expand Up @@ -170,7 +170,7 @@ class ImageUploadingWidget extends StatelessWidget {
const SizedBox(height: 8),
Text(
'Uploading',
style: Theme.of(context).textTheme.overline,
style: Theme.of(context).textTheme.labelSmall,
textAlign: TextAlign.center,
),
],
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/login/login_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ class _MyLoginPageState extends State<LoginPage>
FocusScope.of(context).unfocus();
loginBloc.submitLogin();
},
color: Theme.of(context).backgroundColor,
color: Theme.of(context).colorScheme.surface,
splashColor: Theme.of(context).colorScheme.secondary,
child: const Text(
'LOGIN',
Expand Down
6 changes: 3 additions & 3 deletions lib/pages/register/register_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ class _RegisterPageState extends State<RegisterPage>
color: Colors.transparent,
width: double.infinity,
height: kToolbarHeight,
child: Row(
child: const Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: const [
children: [
BackButton(color: Colors.white),
],
),
Expand Down Expand Up @@ -235,7 +235,7 @@ class _RegisterPageState extends State<RegisterPage>
FocusScope.of(context).unfocus();
registerBloc.submitRegister();
},
color: Theme.of(context).backgroundColor,
color: Theme.of(context).colorScheme.surface,
splashColor: Theme.of(context).colorScheme.secondary,
child: const Text(
'REGISTER',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ class _InputTokenAndResetPasswordPageState
},
);

final overlayColor = MaterialStateProperty.resolveWith((states) {
if (states.contains(MaterialState.hovered)) {
final overlayColor = WidgetStateProperty.resolveWith((states) {
if (states.contains(WidgetState.hovered)) {
return Theme.of(context).colorScheme.secondary.withOpacity(0.5);
}
if (states.contains(MaterialState.focused) ||
states.contains(MaterialState.pressed)) {
if (states.contains(WidgetState.focused) ||
states.contains(WidgetState.pressed)) {
return Theme.of(context).colorScheme.secondary.withOpacity(0.8);
}
return null;
Expand Down
8 changes: 4 additions & 4 deletions lib/pages/reset_password/send_email/send_email_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ class _SendEmailPageState extends State<SendEmailPage>
},
);

final overlayColor = MaterialStateProperty.resolveWith((states) {
if (states.contains(MaterialState.hovered)) {
final overlayColor = WidgetStateProperty.resolveWith((states) {
if (states.contains(WidgetState.hovered)) {
return Theme.of(context).colorScheme.secondary.withOpacity(0.5);
}
if (states.contains(MaterialState.focused) ||
states.contains(MaterialState.pressed)) {
if (states.contains(WidgetState.focused) ||
states.contains(WidgetState.pressed)) {
return Theme.of(context).colorScheme.secondary.withOpacity(0.8);
}
return null;
Expand Down
Loading

0 comments on commit 5f423c6

Please sign in to comment.