Skip to content

Commit 515a7fe

Browse files
committed
feat: update UI design
1 parent fe5a65b commit 515a7fe

13 files changed

Lines changed: 47 additions & 30 deletions

File tree

images/banner.png

-43.8 KB
Binary file not shown.

images/logo.png

2.31 MB
Loading

lib/src/core/common/widgets/custom_app_bar.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
2929
return Container(
3030
width: preferredSize.width,
3131
height: preferredSize.height,
32-
color: CustomColors.brandBlue,
32+
color: CustomColors.brandPurple,
3333
padding: EdgeInsets.only(
3434
top: context.topPadding,
3535
left: context.leftPadding + 16.0,
@@ -79,10 +79,10 @@ class _SCAppBarBackButton extends StatelessWidget {
7979
highlightElevation: 0.0,
8080
hoverElevation: 0.0,
8181
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(size / 2.0)),
82-
fillColor: CustomColors.brandPink,
82+
fillColor: CustomColors.brandYellow,
8383
child: Icon(
8484
LucideIcons.arrowLeft,
85-
color: CustomColors.white,
85+
color: CustomColors.brandDarkPurple,
8686
size: size / 2.0
8787
)
8888
)

lib/src/core/common/widgets/custom_button.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class CustomButton extends StatelessWidget {
2323
height: 48.0,
2424
child: RawMaterialButton(
2525
onPressed: onPressed,
26-
fillColor: backgroundColor ?? CustomColors.brandPink,
26+
fillColor: backgroundColor ?? CustomColors.brandYellow,
2727
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)),
2828
padding: const EdgeInsets.symmetric(horizontal: 16.0),
2929
elevation: 0.0,
@@ -39,7 +39,7 @@ class CustomButton extends StatelessWidget {
3939
style: TextStyle(
4040
fontSize: 18.0,
4141
fontWeight: FontWeight.w600,
42-
color: CustomColors.white
42+
color: CustomColors.brandDarkPurple
4343
)
4444
)
4545
)

lib/src/core/common/widgets/custom_chip.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class SPChip extends StatelessWidget {
2323
child: IntrinsicWidth(
2424
child: RawMaterialButton(
2525
onPressed: onPressed,
26-
fillColor: isHighlighted ? CustomColors.brandPink : CustomColors.blue900,
26+
fillColor: isHighlighted ? CustomColors.brandYellow : CustomColors.brandDarkPurple,
2727
padding: const EdgeInsets.symmetric(horizontal: 8.0),
2828
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(19.0)),
2929
elevation: 0.0,
@@ -38,7 +38,7 @@ class SPChip extends StatelessWidget {
3838
style: TextStyle(
3939
fontSize: 15.0,
4040
fontWeight: FontWeight.w600,
41-
color: CustomColors.white
41+
color: isHighlighted ? CustomColors.brandDarkPurple : CustomColors.brandLightPurple
4242
)
4343
)
4444
)

lib/src/core/common/widgets/custom_scaffold.dart

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'package:flutter/material.dart';
2+
import 'package:flutter/services.dart';
23

34
import 'package:ayto_app/src/core/common/widgets/custom_app_bar.dart';
45
import 'package:ayto_app/src/core/res/custom_colors.dart';
@@ -16,10 +17,20 @@ class CustomScaffold extends StatelessWidget {
1617

1718
@override
1819
Widget build(BuildContext context) {
19-
return Scaffold(
20-
backgroundColor: CustomColors.brandBlue,
21-
appBar: appBar,
22-
body: body
20+
return AnnotatedRegion(
21+
value: SystemUiOverlayStyle(
22+
systemNavigationBarColor: CustomColors.brandPurple,
23+
systemNavigationBarIconBrightness: Brightness.light,
24+
systemNavigationBarDividerColor: CustomColors.brandPurple,
25+
statusBarColor: CustomColors.transparent,
26+
statusBarBrightness: Brightness.light,
27+
statusBarIconBrightness: Brightness.light
28+
),
29+
child: Scaffold(
30+
backgroundColor: CustomColors.brandPurple,
31+
appBar: appBar,
32+
body: body
33+
)
2334
);
2435
}
2536
}

lib/src/core/common/widgets/custom_text_field.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class CustomTextField extends StatelessWidget {
2828
final InputBorder defaultBorder = OutlineInputBorder(
2929
borderRadius: BorderRadius.circular(12.0),
3030
borderSide: BorderSide(
31-
color: CustomColors.blue300,
31+
color: CustomColors.brandLightPurple,
3232
width: 1.5
3333
)
3434
);
@@ -45,7 +45,7 @@ class CustomTextField extends StatelessWidget {
4545
controller: controller,
4646
autocorrect: false,
4747
keyboardType: inputType,
48-
cursorColor: CustomColors.white,
48+
cursorColor: CustomColors.brandLightPurple,
4949
style: defaultTextStyle,
5050
focusNode: focusNode,
5151
autofocus: autoFocus,
@@ -59,9 +59,9 @@ class CustomTextField extends StatelessWidget {
5959
enabledBorder: defaultBorder,
6060
disabledBorder: defaultBorder,
6161
focusedErrorBorder: defaultBorder,
62-
focusedBorder: defaultBorder.copyWith(borderSide: defaultBorder.borderSide.copyWith(color: CustomColors.white)),
62+
focusedBorder: defaultBorder.copyWith(borderSide: defaultBorder.borderSide.copyWith(color: CustomColors.brandYellow)),
6363
hintText: hint,
64-
hintStyle: defaultTextStyle.copyWith(color: CustomColors.gray200)
64+
hintStyle: defaultTextStyle.copyWith(color: CustomColors.brandLightPurple)
6565
)
6666
);
6767
}

lib/src/core/res/custom_assets.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ class CustomAssets {
33
static const String _imagesFolderName = 'images';
44
static const String _dataFolderName = 'data';
55

6-
static const String banner = '$_imagesFolderName/banner.png';
6+
static const String logo = '$_imagesFolderName/logo.png';
77

88
static const String database = '$_dataFolderName/database.json';
99
}

lib/src/core/res/custom_colors.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import 'package:flutter/material.dart';
33
class CustomColors {
44

55
static const Color brandPurple = Color(0xFF726CB2);
6-
7-
static const Color brandBlue = Color(0xFF0A9FDF);
8-
static const Color brandPink = Color(0xFFEA598F);
6+
static const Color brandLightPurple = Color(0xFFDAD5F5);
7+
static const Color brandDarkPurple = Color(0xFF261D66);
8+
static const Color brandYellow = Color(0xFFEAF463);
99

1010
static const Color transparent = Color(0x00000000);
1111

lib/src/features/create_game/presentation/pages/create_game_page.dart

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,19 @@ class _CreateGamePageState extends ConsumerState<CreateGamePage> {
2727
final TextEditingController _playerNamesController = TextEditingController();
2828

2929
Future<void> _onPlayGame() async {
30+
final GameState state = ref.read(gameStateNotifierProvider);
31+
if (state.playerNames.length < 2) return;
32+
3033
ref.read(gameStateNotifierProvider.notifier).setInitials();
3134
await const PlayGameRoute().push(context);
3235
}
3336

3437
void _addPlayerName(String playerName) {
35-
ref.read(gameStateNotifierProvider.notifier).addPlayerName(playerName);
36-
_playerNamesController.clear();
38+
if (playerName.isNotEmpty) {
39+
ref.read(gameStateNotifierProvider.notifier).addPlayerName(playerName);
40+
_playerNamesController.clear();
41+
}
42+
3743
_playerNamesFocusNode.requestFocus();
3844
}
3945

0 commit comments

Comments
 (0)