This commit is contained in:
Kyaw Khant Win 2026-04-02 00:28:59 +06:30
parent a436c85ba6
commit 4ee6b709d2
103 changed files with 7738 additions and 7764 deletions

View File

@ -1,3 +1,6 @@
import java.util.Properties
import java.io.FileInputStream
plugins {
id("com.android.application")
id("kotlin-android")
@ -5,6 +8,13 @@ plugins {
id("dev.flutter.flutter-gradle-plugin")
}
val keystoreProperties = Properties()
val keystorePropertiesFile = rootProject.file("key.properties")
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
}
android {
namespace = "com.example.e_receipt_mobile"
compileSdk = flutter.compileSdkVersion

View File

@ -1,6 +1,9 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:label="e_receipt_mobile"
android:label="E Receipt"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 B

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 721 B

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View File

@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"

View File

@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"

43
ios/Podfile Normal file
View File

@ -0,0 +1,43 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '13.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end

View File

@ -5,7 +5,6 @@ import 'package:e_receipt_mobile/presentation/home/merchant_paging_view_model.da
import 'package:e_receipt_mobile/presentation/home/widgets/home_drawer.dart';
import 'package:e_receipt_mobile/presentation/home/widgets/merchant_header.dart';
import 'package:e_receipt_mobile/presentation/home/widgets/merchant_list_view.dart';
import 'package:e_receipt_mobile/presentation/settings/settings_screen.dart';
import 'package:e_receipt_mobile/presentation/terminal/terminal_selection_screen.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
@ -38,29 +37,10 @@ class HomeScreen extends ConsumerWidget {
),
drawer: HomeDrawer(
user: user,
onProfile: () {
Navigator.of(context).pop();
_showProfile(context, user);
},
onReports: () {
Navigator.of(context).pop();
_showComingSoon(context, 'Reports');
},
onSettings: () {
Navigator.of(context).pop();
Navigator.of(context).push(
MaterialPageRoute<void>(builder: (_) => const SettingsScreen()),
);
},
onHelp: () {
Navigator.of(context).pop();
_showComingSoon(context, 'Help');
},
onLogout: () async {
if (logoutState.isLoading) {
return;
}
final shouldLogout = await showDialog<bool>(
context: context,
builder: (context) {
@ -215,37 +195,7 @@ class HomeScreen extends ConsumerWidget {
);
}
void _showComingSoon(BuildContext context, String feature) {
ScaffoldMessenger.of(
context,
).showSnackBar(SnackBar(content: Text('$feature is coming soon')));
}
void _showProfile(BuildContext context, LoginUser user) {
showDialog<void>(
context: context,
builder: (context) {
return AlertDialog(
title: const Text('Profile'),
content: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('Username: ${user.username}'),
const SizedBox(height: 8),
Text('Role: ${user.role}'),
],
),
actions: [
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: const Text('Close'),
),
],
);
},
);
}
void _openTerminalSelection(
BuildContext context,

View File

@ -5,19 +5,11 @@ import 'package:flutter/material.dart';
class HomeDrawer extends StatelessWidget {
const HomeDrawer({
required this.user,
required this.onProfile,
required this.onReports,
required this.onSettings,
required this.onHelp,
required this.onLogout,
super.key,
});
final LoginUser user;
final VoidCallback onProfile;
final VoidCallback onReports;
final VoidCallback onSettings;
final VoidCallback onHelp;
final VoidCallback onLogout;
@override
@ -29,33 +21,7 @@ class HomeDrawer extends StatelessWidget {
child: Column(
children: [
_DrawerHeader(user: user),
Expanded(
child: ListView(
padding: const EdgeInsets.symmetric(vertical: 8),
children: [
_DrawerItem(
icon: Icons.person_outline,
label: 'Profile',
onTap: onProfile,
),
_DrawerItem(
icon: Icons.analytics_outlined,
label: 'Reports',
onTap: onReports,
),
_DrawerItem(
icon: Icons.settings_outlined,
label: 'Settings',
onTap: onSettings,
),
_DrawerItem(
icon: Icons.help_outline,
label: 'Help',
onTap: onHelp,
),
],
),
),
const Spacer(),
Divider(
height: 1,
thickness: 1,

View File

@ -236,10 +236,10 @@ packages:
dependency: transitive
description:
name: matcher
sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
sha256: "12956d0ad8390bbcc63ca2e1469c0619946ccb52809807067a7020d57e647aa6"
url: "https://pub.dev"
source: hosted
version: "0.12.19"
version: "0.12.18"
material_color_utilities:
dependency: transitive
description:
@ -473,10 +473,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "8161c84903fd860b26bfdefb7963b3f0b68fee7adea0f59ef805ecca346f0c7a"
sha256: "93167629bfc610f71560ab9312acdda4959de4df6fac7492c89ff0d3886f6636"
url: "https://pub.dev"
source: hosted
version: "0.7.10"
version: "0.7.9"
typed_data:
dependency: transitive
description:

View File

@ -14,9 +14,9 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# In Windows, build-name is hused as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+1
version: 2.0.0+1
environment:
sdk: ^3.10.7