Skip to content

Commit bbd62af

Browse files
fix: app theme
1 parent 10418a9 commit bbd62af

File tree

4 files changed

+67
-27
lines changed

4 files changed

+67
-27
lines changed

.github/workflows/release.yaml

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,60 @@ name: Release
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66

77
jobs:
88
build_android:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout the code
12-
uses: actions/checkout@v1
12+
uses: actions/checkout@v4
1313

14-
- name: Setup java to compile android project
15-
uses: actions/setup-java@v1
14+
- name: Setup Java
15+
uses: actions/setup-java@v4
1616
with:
17-
java-version: "12.x"
17+
distribution: "zulu"
18+
java-version: "17"
1819

19-
- name: Install and set flutter version
20+
- name: Install and set Flutter
2021
uses: subosito/flutter-action@v2
2122
with:
22-
flutter-version: "3.10.3"
23+
flutter-version: "3.19.2"
2324
channel: "stable"
25+
cache: true
2426

25-
- name: Check dir
27+
- name: Check directory
2628
run: ls /home/runner/work
2729

28-
- name: Create the keystore
30+
- name: Create keystore
2931
run: echo "${{ secrets.KEY }}" | base64 -d > ./android/key.jks
3032

31-
- name: Create the properties
33+
- name: Create properties
3234
run: echo "${{ secrets.PROPERTIES }}" | base64 -d > ./android/key.properties
3335

34-
- name: Get packages
36+
- name: Install dependencies
3537
run: flutter pub get
3638

3739
- name: Run tests
3840
run: flutter test
3941

40-
- name: Build android app
42+
- name: Build Android APK
4143
run: |
4244
flutter build apk --split-per-abi --release
4345
ls -lh build/app/outputs/apk/release/
4446
45-
- name: Setup Telegram Action
47+
- name: Upload APKs
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: release-apks
51+
path: build/app/outputs/apk/release/*-release.apk
52+
retention-days: 5
53+
54+
- name: Send to Telegram
4655
uses: appleboy/telegram-action@master
4756
with:
4857
token: ${{ secrets.BOT_ID }}
4958
to: ${{ secrets.CHAT_ID }}
50-
message: "New Pmodoro release is available!"
59+
message: "🚀 New Pomodoro release is available!"
5160
document: |
5261
build/app/outputs/apk/release/*-release.apk

lib/core/constant/constant.dart

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ import "package:google_fonts/google_fonts.dart";
44
import "package:pomodore/core/resources/params/theme_params.dart";
55

66
class AppConstant {
7+
static final _poppinsFont = GoogleFonts.poppins().fontFamily;
8+
79
/// dimens
810
static const radius = 10.0;
911
static const modalPadding = 15.0;
1012
static const iconSize = 20.0;
1113

1214
// strings
13-
static const appName = "Pmodoro";
15+
static const appName = "Pomodoro";
1416
static const fontFamily = "inter";
1517

1618
// Hero tags
@@ -22,10 +24,20 @@ class AppConstant {
2224
? "assets/images/logov2_light_mode.png"
2325
: "assets/images/logov2.png";
2426

25-
static String? getFontFamily() => GoogleFonts.poppins().fontFamily;
27+
static String? getFontFamily() => _poppinsFont;
2628

27-
static TextStyle getTextStyle({double? fontSize, Color? color}) =>
28-
TextStyle(color: color, fontSize: fontSize);
29+
static TextStyle getTextStyle({
30+
double? fontSize,
31+
Color? color,
32+
FontWeight? fontWeight,
33+
double? letterSpacing,
34+
}) =>
35+
TextStyle(
36+
color: color,
37+
fontSize: fontSize,
38+
fontWeight: fontWeight,
39+
letterSpacing: letterSpacing,
40+
);
2941

3042
static TextTheme getTextTheme({Color? color}) => TextTheme(
3143
bodyLarge: getTextStyle(color: color),
@@ -66,11 +78,15 @@ class AppConstant {
6678
onError: Colors.white,
6779
surface: Colors.black12,
6880
onSurface: Colors.black,
81+
surfaceTint: Colors.black12,
82+
surfaceContainerHighest: Colors.black12,
83+
inverseSurface: Colors.white,
6984
),
7085
snackBarTheme: const SnackBarThemeData(
7186
backgroundColor: Colors.black,
7287
),
7388
appBarTheme: const AppBarTheme(
89+
systemOverlayStyle: SystemUiOverlayStyle.light,
7490
backgroundColor: Colors.transparent,
7591
elevation: 0,
7692
iconTheme: IconThemeData(
@@ -110,6 +126,9 @@ class AppConstant {
110126
onError: Colors.white,
111127
surface: Colors.white10,
112128
onSurface: Colors.white,
129+
surfaceTint: Colors.white10,
130+
surfaceContainerHighest: Colors.white24,
131+
inverseSurface: Colors.black,
113132
),
114133
snackBarTheme: const SnackBarThemeData(
115134
backgroundColor: Color(0xff01ED64),
@@ -160,11 +179,15 @@ class AppConstant {
160179
onError: Colors.white,
161180
surface: Colors.white10,
162181
onSurface: Colors.white,
182+
surfaceTint: Colors.white10,
183+
surfaceContainerHighest: Colors.white24,
184+
inverseSurface: Color(0xff2e3440),
163185
),
164186
snackBarTheme: const SnackBarThemeData(
165187
backgroundColor: Color(0xff8fbcbb),
166188
),
167189
appBarTheme: const AppBarTheme(
190+
systemOverlayStyle: SystemUiOverlayStyle.light,
168191
backgroundColor: Colors.transparent,
169192
elevation: 0,
170193
iconTheme: IconThemeData(
@@ -209,11 +232,15 @@ class AppConstant {
209232
onError: Colors.white,
210233
surface: Colors.white10,
211234
onSurface: Colors.white,
235+
surfaceTint: Colors.white10,
236+
surfaceContainerHighest: Colors.white24,
237+
inverseSurface: Color(0xff0C134F),
212238
),
213239
snackBarTheme: const SnackBarThemeData(
214240
backgroundColor: Color(0xffD4ADFC),
215241
),
216242
appBarTheme: const AppBarTheme(
243+
systemOverlayStyle: SystemUiOverlayStyle.light,
217244
backgroundColor: Colors.transparent,
218245
elevation: 0,
219246
iconTheme: IconThemeData(
@@ -237,7 +264,7 @@ class AppConstant {
237264
),
238265
);
239266

240-
static final List<ThemeParams> themes = [
267+
static List<ThemeParams> themes = [
241268
ThemeParams("light", defaultLightTheme, "Light Minimal"),
242269
ThemeParams("dark", defaultDarkTheme, "Dark Minimal"),
243270
ThemeParams("polar", polarNightTheme, "Polar Night"),

lib/core/shared_widgets/global_button.dart

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import "package:flutter/material.dart";
22

33
class GlobalButton extends StatelessWidget {
44
const GlobalButton({
5-
Key? key,
5+
super.key,
66
this.child,
77
required this.onPressed,
88
this.width,
@@ -13,7 +13,7 @@ class GlobalButton extends StatelessWidget {
1313
this.backgroundColor,
1414
this.title,
1515
this.titleStyle,
16-
}) : super(key: key);
16+
});
1717

1818
final VoidCallback onPressed;
1919
final Widget? child;
@@ -33,9 +33,13 @@ class GlobalButton extends StatelessWidget {
3333
padding: padding ?? const EdgeInsets.symmetric(horizontal: 10),
3434
shape: shape ??
3535
const RoundedRectangleBorder(
36-
borderRadius: BorderRadius.all(Radius.circular(10))),
36+
borderRadius: BorderRadius.all(
37+
Radius.circular(10),
38+
),
39+
),
3740
elevation: elevation ?? 5,
38-
backgroundColor: backgroundColor,
41+
backgroundColor:
42+
backgroundColor ?? Theme.of(context).colorScheme.secondary,
3943
);
4044

4145
return ElevatedButton(

lib/features/task_management/presentation/pages/add_task_page.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import "../../../../di.dart";
1919
import "../../../../exports.dart";
2020

2121
class AddTaskPage extends StatelessWidget {
22-
const AddTaskPage({Key? key, this.editItem}) : super(key: key);
22+
const AddTaskPage({super.key, this.editItem});
2323

2424
static const routeName = "/addTask";
2525

@@ -34,7 +34,7 @@ class AddTaskPage extends StatelessWidget {
3434
}
3535

3636
class AddTaskView extends HookWidget {
37-
const AddTaskView({Key? key}) : super(key: key);
37+
const AddTaskView({super.key});
3838

3939
@override
4040
Widget build(BuildContext context) {
@@ -108,7 +108,7 @@ class AddTaskView extends HookWidget {
108108
height: SizeConfig.heightMultiplier * 5,
109109
decoration: BoxDecoration(
110110
border: Border.all(
111-
color: Theme.of(context).colorScheme.onBackground),
111+
color: Theme.of(context).colorScheme.onSurface),
112112
borderRadius: BorderRadius.circular(AppConstant.radius),
113113
),
114114
child: TextButton(
@@ -117,7 +117,7 @@ class AddTaskView extends HookWidget {
117117
context: context,
118118
builder: (_) => Container(
119119
height: 500,
120-
color: Theme.of(context).colorScheme.background,
120+
color: Theme.of(context).colorScheme.surface,
121121
child: Column(
122122
children: [
123123
SizedBox(

0 commit comments

Comments
 (0)