Skip to content

Commit c9b8ccd

Browse files
committed
feat: update app bar in home screen and remove notification count
workflow: changed build to happen on push to main
1 parent 1313159 commit c9b8ccd

File tree

3 files changed

+5
-36
lines changed

3 files changed

+5
-36
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name: "Build"
22

3+
description: "Build and release Flutter application for Android and iOS"
4+
35
on:
4-
pull_request:
6+
push:
57
branches:
68
- main
79

@@ -11,44 +13,36 @@ jobs:
1113
runs-on: macos-latest
1214

1315
steps:
14-
#1 Checkout Repository
1516
- name: Checkout Repository
1617
uses: actions/checkout@v3
1718

18-
#2 Setup Java
1919
- name: Set Up Java
2020
uses: actions/setup-java@v3.12.0
2121
with:
2222
distribution: 'oracle'
2323
java-version: '17'
2424

25-
#3 Setup Flutter
2625
- name: Set Up Flutter
2726
uses: subosito/flutter-action@v2
2827
with:
2928
flutter-version: '3.29.0'
3029
channel: 'stable'
3130

32-
#4 Install Dependencies
3331
- name: Install Dependencies
3432
run: flutter pub get
3533

36-
#5 Extract Version
3734
- name: Extract version from pubspec.yaml
3835
id: extract_version
3936
run: |
4037
version=$(grep '^version: ' pubspec.yaml | cut -d ' ' -f 2 | tr -d '\r')
4138
echo "VERSION=$version" >> $GITHUB_ENV
4239
43-
#6 Building APK
4440
- name: Build APK
4541
run: flutter build apk --release --dart-define=APP_VERSION=${{ env.VERSION }} --dart-define=GIT_COMMIT=${{ github.sha }}
4642

47-
#7 Building App Bundle (aab)
4843
- name: Build appBundle
4944
run: flutter build appbundle --release --dart-define=APP_VERSION=${{ env.VERSION }} --dart-define=GIT_COMMIT=${{ github.sha }}
5045

51-
#8 Build IPA ( IOS Build )
5246
- name: Build IPA
5347
run: flutter build ipa --no-codesign --dart-define=APP_VERSION=${{ env.VERSION }} --dart-define=GIT_COMMIT=${{ github.sha }}
5448

@@ -57,7 +51,6 @@ jobs:
5751
cd build
5852
tar -czf ios_build.tar.gz ios
5953
60-
#9 Upload Artifacts
6154
- name: Upload Artifacts
6255
uses: actions/upload-artifact@v4
6356
with:
@@ -67,7 +60,6 @@ jobs:
6760
build/app/outputs/bundle/release/app-release.aab
6861
build/ios_build.tar.gz
6962
70-
#10 Check if Tag Exists
7163
- name: Check if Tag Exists
7264
id: check_tag
7365
run: |
@@ -77,15 +69,13 @@ jobs:
7769
echo "TAG_EXISTS=false" >> $GITHUB_ENV
7870
fi
7971
80-
#12 Modify Tag if it Exists
8172
- name: Modify Tag
8273
if: ${{ env.TAG_EXISTS }} == 'true'
8374
id: modify_tag
8475
run: |
8576
new_version="${{ env.VERSION }}-alpha-${{ github.run_number }}"
8677
echo "VERSION=$new_version" >> $GITHUB_ENV
8778
88-
#13 Create Release
8979
- name: Create Release
9080
uses: ncipollo/release-action@v1
9181
with:

lib/features/home/screens/home_screen.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import 'package:mostro_mobile/features/home/providers/home_order_providers.dart'
77
import 'package:mostro_mobile/features/home/widgets/order_list_item.dart';
88
import 'package:mostro_mobile/shared/widgets/add_order_button.dart';
99
import 'package:mostro_mobile/shared/widgets/bottom_nav_bar.dart';
10+
import 'package:mostro_mobile/shared/widgets/mostro_app_bar.dart';
1011
import 'package:mostro_mobile/shared/widgets/order_filter.dart';
1112
import 'package:mostro_mobile/shared/widgets/mostro_app_drawer.dart';
1213

@@ -19,7 +20,7 @@ class HomeScreen extends ConsumerWidget {
1920

2021
return Scaffold(
2122
backgroundColor: AppTheme.backgroundDark,
22-
appBar: _buildAppBar(),
23+
appBar: MostroAppBar(),
2324
drawer: const MostroAppDrawer(),
2425
body: Stack(
2526
children: [

lib/shared/widgets/mostro_app_bar.dart

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -44,28 +44,6 @@ class MostroAppBar extends ConsumerWidget implements PreferredSizeWidget {
4444
},
4545
),
4646
// Notification count indicator
47-
Positioned(
48-
top: 10,
49-
right: 10,
50-
child: Container(
51-
width: 18,
52-
height: 18,
53-
decoration: const BoxDecoration(
54-
color: Colors.red,
55-
shape: BoxShape.circle,
56-
),
57-
child: const Center(
58-
child: Text(
59-
'6',
60-
style: TextStyle(
61-
color: Colors.white,
62-
fontSize: 10,
63-
fontWeight: FontWeight.bold,
64-
),
65-
),
66-
),
67-
),
68-
),
6947
],
7048
),
7149
const SizedBox(width: 16), // Spacing

0 commit comments

Comments
 (0)