├── android ├── gradle.properties ├── .settings │ └── org.eclipse.buildship.core.prefs ├── app │ ├── .settings │ │ └── org.eclipse.buildship.core.prefs │ ├── src │ │ └── main │ │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values │ │ │ │ └── styles.xml │ │ │ └── drawable │ │ │ │ └── launch_background.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── reduxexercise │ │ │ │ └── MainActivity.java │ │ │ └── AndroidManifest.xml │ ├── .classpath │ ├── .project │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .project ├── settings.gradle └── build.gradle ├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── AppDelegate.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── main.m │ ├── AppDelegate.m │ ├── Info.plist │ └── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── project.pbxproj ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── WorkspaceSettings.xcsettings └── Podfile ├── lib ├── models │ ├── app_route.dart │ ├── bill.dart │ ├── product.dart │ ├── transaction.dart │ └── app_state.dart ├── reducers │ ├── loading_reducer.dart │ ├── app_reducer.dart │ └── product_reducer.dart ├── repository │ ├── data_repo.dart │ └── local_repository.dart ├── actions │ └── action.dart ├── main.dart ├── presentation │ ├── transaction_view.dart │ ├── detail_bill.dart │ ├── form_product.dart │ ├── home_screen.dart │ ├── bottomsheet.dart │ └── form_transaction.dart ├── db │ └── db_helper.dart └── middleware │ └── app_middleware.dart ├── .metadata ├── README.md ├── test └── widget_test.dart ├── .gitignore └── pubspec.yaml /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /android/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir= 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /android/app/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir=.. 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariefannur/fPOS-Flutter/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariefannur/fPOS-Flutter/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariefannur/fPOS-Flutter/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariefannur/fPOS-Flutter/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariefannur/fPOS-Flutter/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariefannur/fPOS-Flutter/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariefannur/fPOS-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariefannur/fPOS-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariefannur/fPOS-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariefannur/fPOS-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariefannur/fPOS-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariefannur/fPOS-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariefannur/fPOS-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariefannur/fPOS-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariefannur/fPOS-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariefannur/fPOS-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariefannur/fPOS-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariefannur/fPOS-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariefannur/fPOS-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariefannur/fPOS-Flutter/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariefannur/fPOS-Flutter/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariefannur/fPOS-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ariefannur/fPOS-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/models/app_route.dart: -------------------------------------------------------------------------------- 1 | 2 | class AppRoute{ 3 | static final home = "/"; 4 | static final addProduct = "/addProduct"; 5 | static final addTransaction= "/addTransaction"; 6 | static final detailTransaction= "/detailTransaction"; 7 | } -------------------------------------------------------------------------------- /ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip 7 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 5391447fae6209bb21a89e6a5a6583cac1af9b4b 8 | channel: beta 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /lib/models/bill.dart: -------------------------------------------------------------------------------- 1 | class Bill{ 2 | final int id; 3 | final int date; 4 | final int totalPrice; 5 | Bill({this.id, this.date, this.totalPrice}); 6 | 7 | factory Bill.fromMap(Map json) => new Bill( 8 | id: json["id_bill"], 9 | date: json["date"], 10 | totalPrice: json["total_price"], 11 | ); 12 | 13 | } -------------------------------------------------------------------------------- /lib/reducers/loading_reducer.dart: -------------------------------------------------------------------------------- 1 | import 'package:redux/redux.dart'; 2 | import 'package:redux_exercise/actions/action.dart'; 3 | final loadingReducer = combineReducers([ 4 | TypedReducer(_setLoaded), 5 | TypedReducer(_setLoaded) 6 | ]); 7 | 8 | bool _setLoaded(bool state, action) { 9 | return false; 10 | } -------------------------------------------------------------------------------- /android/app/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/example/reduxexercise/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.reduxexercise; 2 | 3 | import android.os.Bundle; 4 | import io.flutter.app.FlutterActivity; 5 | import io.flutter.plugins.GeneratedPluginRegistrant; 6 | 7 | public class MainActivity extends FlutterActivity { 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | GeneratedPluginRegistrant.registerWith(this); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | android 4 | Project android created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.buildship.core.gradleprojectbuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.buildship.core.gradleprojectnature 16 | 17 | 18 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /lib/models/product.dart: -------------------------------------------------------------------------------- 1 | class Product{ 2 | int id; 3 | String name; 4 | int price; 5 | int qty; 6 | Product({this.id, this.name, this.price, this.qty}); 7 | 8 | factory Product.fromMap(Map json) => new Product( 9 | id: json["id"], 10 | name: json["product_name"], 11 | price: json["price"], 12 | qty: json["qty"] 13 | ); 14 | 15 | void setData(int id, String name, int price, int qty){ 16 | this.id = id; 17 | this.name= name; 18 | this.price = price; 19 | this.qty = qty; 20 | } 21 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # fPOS-Flutter 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.io/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.io/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.io/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.2.1' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /lib/models/transaction.dart: -------------------------------------------------------------------------------- 1 | 2 | class TransactionData{ 3 | final int id; 4 | final int productId; 5 | final int count; 6 | final int itemPrice; 7 | final String productName; 8 | int billId; 9 | 10 | TransactionData({this.id, this.productId, this.count, this.itemPrice, this.billId, this.productName}); 11 | 12 | factory TransactionData.fromMap(Map json) => new TransactionData( 13 | id: json['id'], 14 | productId: json['product_id'], 15 | count: json['count'], 16 | itemPrice: json['item_price'], 17 | billId: json['bill_id'], 18 | productName: json['name'] 19 | ); 20 | } -------------------------------------------------------------------------------- /lib/repository/data_repo.dart: -------------------------------------------------------------------------------- 1 | import 'package:redux_exercise/models/bill.dart'; 2 | import 'package:redux_exercise/models/product.dart'; 3 | import 'package:redux_exercise/models/transaction.dart'; 4 | 5 | abstract class DataRepository{ 6 | 7 | Future> loadAllProducts(); 8 | 9 | Future> searchProducts(String name); 10 | 11 | Future getProducts(String name); 12 | 13 | Future saveProduct(Product products); 14 | 15 | Future saveBill(Bill bill); 16 | 17 | Future saveItemTransaction(List data); 18 | 19 | Future> getBills(); 20 | 21 | Future> getTransactionDetail(int idBill); 22 | } -------------------------------------------------------------------------------- /android/app/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | app 4 | Project app created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.buildship.core.gradleprojectbuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.buildship.core.gradleprojectnature 22 | 23 | 24 | -------------------------------------------------------------------------------- /lib/models/app_state.dart: -------------------------------------------------------------------------------- 1 | import 'package:redux_exercise/models/bill.dart'; 2 | import 'package:redux_exercise/models/product.dart'; 3 | import 'package:meta/meta.dart'; 4 | import 'package:redux_exercise/models/transaction.dart'; 5 | 6 | @immutable 7 | class AppState{ 8 | final bool isLoading; 9 | final List products; 10 | final Product product; 11 | final List transactions; 12 | final List bills; 13 | final String query; 14 | final int idBill; 15 | final Bill insertedBill; 16 | 17 | AppState({this.isLoading = false, this.products = const [], this.product, this.transactions, this.bills, this.query, this.insertedBill, this.idBill}); 18 | factory AppState.loading() => AppState(isLoading: true); 19 | } -------------------------------------------------------------------------------- /lib/reducers/app_reducer.dart: -------------------------------------------------------------------------------- 1 | export 'package:redux_exercise/models/app_state.dart'; 2 | import 'package:redux_exercise/models/app_state.dart'; 3 | import 'package:redux_exercise/reducers/loading_reducer.dart'; 4 | import 'package:redux_exercise/reducers/product_reducer.dart'; 5 | 6 | AppState appReducer(AppState state, action){ 7 | 8 | return AppState( 9 | isLoading: loadingReducer(state.isLoading, action), 10 | products: productReducer(state.products, action), 11 | product: oneProductReducer(state.product, action), 12 | transactions: transactionRecuder(state.transactions, action), 13 | bills: billRecuder(state.bills, action), 14 | insertedBill: oneBillReducer(state.insertedBill, action), 15 | query: queryReducer(state.query, action), 16 | idBill: idLastInseted(state.idBill, action) 17 | ); 18 | 19 | } -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:redux_exercise/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.lock 4 | *.log 5 | *.pyc 6 | *.swp 7 | .DS_Store 8 | .atom/ 9 | .buildlog/ 10 | .history 11 | .svn/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # Visual Studio Code related 20 | .vscode/ 21 | 22 | # Flutter/Dart/Pub related 23 | **/doc/api/ 24 | .dart_tool/ 25 | .flutter-plugins 26 | .packages 27 | .pub-cache/ 28 | .pub/ 29 | build/ 30 | 31 | # Android related 32 | **/android/**/gradle-wrapper.jar 33 | **/android/.gradle 34 | **/android/captures/ 35 | **/android/gradlew 36 | **/android/gradlew.bat 37 | **/android/local.properties 38 | **/android/**/GeneratedPluginRegistrant.java 39 | 40 | # iOS/XCode related 41 | **/ios/**/*.mode1v3 42 | **/ios/**/*.mode2v3 43 | **/ios/**/*.moved-aside 44 | **/ios/**/*.pbxuser 45 | **/ios/**/*.perspectivev3 46 | **/ios/**/*sync/ 47 | **/ios/**/.sconsign.dblite 48 | **/ios/**/.tags* 49 | **/ios/**/.vagrant/ 50 | **/ios/**/DerivedData/ 51 | **/ios/**/Icon? 52 | **/ios/**/Pods/ 53 | **/ios/**/.symlinks/ 54 | **/ios/**/profile 55 | **/ios/**/xcuserdata 56 | **/ios/.generated/ 57 | **/ios/Flutter/App.framework 58 | **/ios/Flutter/Flutter.framework 59 | **/ios/Flutter/Generated.xcconfig 60 | **/ios/Flutter/app.flx 61 | **/ios/Flutter/app.zip 62 | **/ios/Flutter/flutter_assets/ 63 | **/ios/ServiceDefinitions.json 64 | **/ios/Runner/GeneratedPluginRegistrant.* 65 | 66 | # Exceptions to above rules. 67 | !**/ios/**/default.mode1v3 68 | !**/ios/**/default.mode2v3 69 | !**/ios/**/default.pbxuser 70 | !**/ios/**/default.perspectivev3 71 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 72 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | redux_exercise 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/repository/local_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:redux_exercise/db/db_helper.dart'; 2 | import 'package:redux_exercise/models/bill.dart'; 3 | import 'package:redux_exercise/models/transaction.dart'; 4 | import 'package:redux_exercise/repository/data_repo.dart'; 5 | import 'package:redux_exercise/models/product.dart'; 6 | import 'dart:async'; 7 | 8 | 9 | class LocalRepository implements DataRepository{ 10 | 11 | const LocalRepository(); 12 | 13 | @override 14 | Future> loadAllProducts() async { 15 | 16 | final products = await DbHelper.db.getAllproduct(); 17 | print("load product : "+products.length.toString()); 18 | return products; 19 | } 20 | 21 | @override 22 | Future saveProduct(Product product) async { 23 | print("Name : "+product.name+" price : "+product.price.toString()+" qty : "+product.qty.toString()); 24 | final prod = await DbHelper.db.insertProduct(product); 25 | return prod; 26 | } 27 | 28 | @override 29 | Future> searchProducts(String name) async{ 30 | final prod = await DbHelper.db.searchProduct(name); 31 | return prod; 32 | } 33 | 34 | @override 35 | Future saveItemTransaction(List data) async{ 36 | var insert = data.forEach((data) async => 37 | await DbHelper.db.insertTransaction(data) 38 | ); 39 | 40 | return insert; 41 | 42 | } 43 | 44 | @override 45 | Future saveBill(Bill billData) async{ 46 | final bill = await DbHelper.db.insertBill(billData); 47 | return bill; 48 | } 49 | 50 | @override 51 | Future getProducts(String name) async{ 52 | final product = await DbHelper.db.getProduct(name); 53 | return product; 54 | } 55 | 56 | @override 57 | Future> getBills() async{ 58 | final bills = await DbHelper.db.getBills(); 59 | print("get bills : "+bills.toString()); 60 | return bills; 61 | } 62 | 63 | @override 64 | Future> getTransactionDetail(int idBill) async{ 65 | final transactions = await DbHelper.db.getDetailTransaction(idBill); 66 | return transactions; 67 | } 68 | 69 | 70 | 71 | } -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 28 29 | 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | 34 | defaultConfig { 35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 36 | applicationId "com.example.reduxexercise" 37 | minSdkVersion 16 38 | targetSdkVersion 27 39 | versionCode flutterVersionCode.toInteger() 40 | versionName flutterVersionName 41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 42 | } 43 | 44 | buildTypes { 45 | release { 46 | // TODO: Add your own signing config for the release build. 47 | // Signing with the debug keys for now, so `flutter run --release` works. 48 | signingConfig signingConfigs.debug 49 | } 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | 57 | dependencies { 58 | testImplementation 'junit:junit:4.12' 59 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 60 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 61 | 62 | } 63 | -------------------------------------------------------------------------------- /lib/actions/action.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:redux_exercise/models/bill.dart'; 4 | import 'package:redux_exercise/models/product.dart'; 5 | import 'package:redux_exercise/models/transaction.dart'; 6 | 7 | class AddProductAction{ 8 | final Product product; 9 | AddProductAction(this.product); 10 | } 11 | 12 | class DeleteProductAction{ 13 | final int id; 14 | DeleteProductAction(this.id); 15 | } 16 | 17 | class UpdateProductAction{ 18 | final int id; 19 | final Product product; 20 | UpdateProductAction(this.id, this.product); 21 | } 22 | 23 | class LoadProductAction {} 24 | 25 | class SearchProductAction {} 26 | 27 | class GetProductAction { 28 | final String query; 29 | GetProductAction({this.query}); 30 | } 31 | 32 | class QueryAction{ 33 | 34 | } 35 | class InsertedIdBill{ 36 | final int insertedId; 37 | InsertedIdBill(this.insertedId); 38 | } 39 | class GetOneProductAction { 40 | final Product product; 41 | GetOneProductAction(this.product); 42 | } 43 | 44 | class SearchedProductAction { 45 | final String query; 46 | SearchedProductAction(this.query); 47 | } 48 | 49 | class SaveTransactionAction {} 50 | 51 | class LoadBills{ 52 | final Completer completer; 53 | 54 | LoadBills({Completer completer}) 55 | : this.completer = completer ?? Completer(); 56 | } 57 | 58 | class SaveBill{} 59 | 60 | class GetDetailTranscationAction{ 61 | final int idBill; 62 | GetDetailTranscationAction({this.idBill}); 63 | } 64 | 65 | class ProductLoadedAction{ 66 | final List products; 67 | ProductLoadedAction(this.products); 68 | } 69 | 70 | 71 | class BillLoadedAction{ 72 | final List bills; 73 | BillLoadedAction(this.bills); 74 | } 75 | 76 | class BillInsertAction{ 77 | final Bill bill; 78 | final List transaction; 79 | BillInsertAction(this.bill, this.transaction); 80 | } 81 | 82 | class TransactionLoadedAction{ 83 | final List transaction; 84 | TransactionLoadedAction(this.transaction); 85 | } 86 | 87 | class ProductNotLoadedAction{} 88 | 89 | class SearchProduct{ 90 | final String name; 91 | SearchProduct(this.name); 92 | } -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 15 | 19 | 26 | 30 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:redux/redux.dart'; 3 | import 'package:flutter_redux/flutter_redux.dart'; 4 | import 'package:redux_exercise/actions/action.dart'; 5 | import 'package:redux_exercise/models/app_route.dart'; 6 | import 'package:redux_exercise/models/app_state.dart'; 7 | import 'package:redux_exercise/presentation/detail_bill.dart'; 8 | import 'package:redux_exercise/presentation/form_product.dart'; 9 | import 'package:redux_exercise/presentation/form_transaction.dart'; 10 | import 'package:redux_exercise/presentation/home_screen.dart'; 11 | import 'package:redux_exercise/reducers/app_reducer.dart'; 12 | import 'package:redux_exercise/middleware/app_middleware.dart'; 13 | import 'package:flutter_stetho/flutter_stetho.dart'; 14 | 15 | void main() { 16 | Stetho.initialize(); 17 | runApp(MyApp()); 18 | } 19 | 20 | 21 | class MyApp extends StatelessWidget { 22 | 23 | final store = Store( 24 | appReducer, 25 | initialState: AppState.loading(), 26 | middleware: createStoreMiddleware() 27 | 28 | ); 29 | 30 | @override 31 | Widget build(BuildContext context) { 32 | return StoreProvider( 33 | store:store, 34 | child:MaterialApp( 35 | title: "fPOS", 36 | routes: { 37 | AppRoute.home:(context){ 38 | return HomeScreen( 39 | onInit: (){ 40 | print("init home : "); 41 | StoreProvider.of(context).dispatch(LoadBills()); 42 | StoreProvider.of(context).dispatch(LoadProductAction()); 43 | }, 44 | ); 45 | }, 46 | AppRoute.addProduct: (context) { 47 | return AddProductForm(); 48 | }, 49 | AppRoute.detailTransaction:(context){ 50 | return DetailBill( 51 | setUp: (){ 52 | 53 | }, 54 | ); 55 | }, 56 | AppRoute.addTransaction:(context){ 57 | return DataTransaction(setUp:(){ 58 | StoreProvider.of(context).dispatch(LoadProductAction()); 59 | }); 60 | } 61 | } 62 | ), 63 | ); 64 | } 65 | } -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def parse_KV_file(file, separator='=') 14 | file_abs_path = File.expand_path(file) 15 | if !File.exists? file_abs_path 16 | return []; 17 | end 18 | pods_ary = [] 19 | skip_line_start_symbols = ["#", "/"] 20 | File.foreach(file_abs_path) { |line| 21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 22 | plugin = line.split(pattern=separator) 23 | if plugin.length == 2 24 | podname = plugin[0].strip() 25 | path = plugin[1].strip() 26 | podpath = File.expand_path("#{path}", file_abs_path) 27 | pods_ary.push({:name => podname, :path => podpath}); 28 | else 29 | puts "Invalid plugin specification: #{line}" 30 | end 31 | } 32 | return pods_ary 33 | end 34 | 35 | target 'Runner' do 36 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 37 | # referring to absolute paths on developers' machines. 38 | system('rm -rf .symlinks') 39 | system('mkdir -p .symlinks/plugins') 40 | 41 | # Flutter Pods 42 | generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') 43 | if generated_xcode_build_settings.empty? 44 | puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first." 45 | end 46 | generated_xcode_build_settings.map { |p| 47 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR' 48 | symlink = File.join('.symlinks', 'flutter') 49 | File.symlink(File.dirname(p[:path]), symlink) 50 | pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) 51 | end 52 | } 53 | 54 | # Plugin Pods 55 | plugin_pods = parse_KV_file('../.flutter-plugins') 56 | plugin_pods.map { |p| 57 | symlink = File.join('.symlinks', 'plugins', p[:name]) 58 | File.symlink(p[:path], symlink) 59 | pod p[:name], :path => File.join(symlink, 'ios') 60 | } 61 | end 62 | 63 | post_install do |installer| 64 | installer.pods_project.targets.each do |target| 65 | target.build_configurations.each do |config| 66 | config.build_settings['ENABLE_BITCODE'] = 'NO' 67 | end 68 | end 69 | end 70 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: redux_exercise 2 | description: Flutter POS apps. 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # Read more about versioning at semver.org. 10 | version: 1.0.0+1 11 | 12 | environment: 13 | sdk: ">=2.1.0 <3.0.0" 14 | 15 | dependencies: 16 | flutter: 17 | sdk: flutter 18 | redux: ^3.0.0 19 | flutter_redux: ^0.5.0 20 | sqflite: any 21 | flutter_stetho: ^0.2.2 22 | autocomplete_textfield: 1.6.4 23 | intl: ^0.15.7 24 | 25 | # The following adds the Cupertino Icons font to your application. 26 | # Use with the CupertinoIcons class for iOS style icons. 27 | cupertino_icons: ^0.1.2 28 | 29 | dev_dependencies: 30 | flutter_test: 31 | sdk: flutter 32 | 33 | 34 | # For information on the generic Dart part of this file, see the 35 | # following page: https://www.dartlang.org/tools/pub/pubspec 36 | 37 | # The following section is specific to Flutter. 38 | flutter: 39 | 40 | # The following line ensures that the Material Icons font is 41 | # included with your application, so that you can use the icons in 42 | # the material Icons class. 43 | uses-material-design: true 44 | 45 | # To add assets to your application, add an assets section, like this: 46 | # assets: 47 | # - images/a_dot_burr.jpeg 48 | # - images/a_dot_ham.jpeg 49 | 50 | # An image asset can refer to one or more resolution-specific "variants", see 51 | # https://flutter.io/assets-and-images/#resolution-aware. 52 | 53 | # For details regarding adding assets from package dependencies, see 54 | # https://flutter.io/assets-and-images/#from-packages 55 | 56 | # To add custom fonts to your application, add a fonts section here, 57 | # in this "flutter" section. Each entry in this list should have a 58 | # "family" key with the font family name, and a "fonts" key with a 59 | # list giving the asset and other descriptors for the font. For 60 | # example: 61 | # fonts: 62 | # - family: Schyler 63 | # fonts: 64 | # - asset: fonts/Schyler-Regular.ttf 65 | # - asset: fonts/Schyler-Italic.ttf 66 | # style: italic 67 | # - family: Trajan Pro 68 | # fonts: 69 | # - asset: fonts/TrajanPro.ttf 70 | # - asset: fonts/TrajanPro_Bold.ttf 71 | # weight: 700 72 | # 73 | # For details regarding fonts from package dependencies, 74 | # see https://flutter.io/custom-fonts/#from-packages 75 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /lib/reducers/product_reducer.dart: -------------------------------------------------------------------------------- 1 | import 'package:redux/redux.dart'; 2 | import 'package:redux_exercise/models/bill.dart'; 3 | import 'package:redux_exercise/models/product.dart'; 4 | import 'package:redux_exercise/actions/action.dart'; 5 | import 'package:redux_exercise/models/transaction.dart'; 6 | 7 | final productReducer = combineReducers>([ 8 | TypedReducer, AddProductAction>(_addProduct), 9 | TypedReducer, DeleteProductAction>(_deleteProduct), 10 | TypedReducer, UpdateProductAction>(_updateProduct), 11 | TypedReducer, ProductLoadedAction>(_getAll), 12 | TypedReducer, SearchedProductAction>(_searchProduct), 13 | 14 | ]); 15 | 16 | final transactionRecuder = combineReducers>([ 17 | TypedReducer, TransactionLoadedAction>(_addTransaction), 18 | TypedReducer, BillInsertAction>(_addTransactionBill), 19 | 20 | ]); 21 | 22 | 23 | final billRecuder = combineReducers>([ 24 | TypedReducer, BillLoadedAction>(_addBill), 25 | ]); 26 | 27 | final queryReducer = combineReducers([ 28 | TypedReducer(_setQuery), 29 | ]); 30 | 31 | final oneProductReducer = combineReducers([ 32 | TypedReducer(_getProduct), 33 | ]); 34 | 35 | final oneBillReducer = combineReducers([ 36 | TypedReducer(_getBill), 37 | ]); 38 | 39 | 40 | final idLastInseted = combineReducers([ 41 | TypedReducer(_getLastId), 42 | ]); 43 | 44 | int _getLastId(int id, InsertedIdBill action){ 45 | return action.insertedId; 46 | } 47 | 48 | String _setQuery(String query, action) { 49 | return query; 50 | } 51 | 52 | List _addProduct(List products, AddProductAction action){ 53 | return List.from(products)..add(action.product); 54 | } 55 | 56 | 57 | List _searchProduct(List products, SearchedProductAction action){ 58 | return products.where((prod) => prod.name.contains(action.query)).toList(); 59 | } 60 | 61 | Product _getProduct(Product product, GetOneProductAction action){ 62 | return action.product; 63 | } 64 | 65 | Bill _getBill(Bill bill, BillInsertAction action){ 66 | return action.bill; 67 | } 68 | 69 | List _addTransaction(List transaction, TransactionLoadedAction action){ 70 | return List.from(action.transaction); 71 | } 72 | 73 | List _addTransactionBill(List transaction, BillInsertAction action){ 74 | return List.from(action.transaction); 75 | } 76 | 77 | List _addBill(List bills, BillLoadedAction action){ 78 | return action.bills; 79 | } 80 | 81 | List _getAll(List products, ProductLoadedAction action){ 82 | return action.products; 83 | } 84 | 85 | 86 | List _deleteProduct(List products, DeleteProductAction action){ 87 | return products.where((product) => product.id != action.id).toList(); 88 | } 89 | 90 | List _updateProduct(List products, UpdateProductAction action){ 91 | return products.map((product) => product.id == action.id ? action.product: product); 92 | } 93 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /lib/presentation/transaction_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/widgets.dart'; 3 | import 'package:redux/redux.dart'; 4 | import 'package:redux_exercise/actions/action.dart'; 5 | import 'package:redux_exercise/presentation/detail_bill.dart'; 6 | import 'package:redux_exercise/models/bill.dart'; 7 | import 'package:flutter_redux/flutter_redux.dart'; 8 | import 'package:redux_exercise/models/app_state.dart'; 9 | import 'package:intl/intl.dart'; 10 | 11 | class TransactionView extends StatefulWidget{ 12 | @override 13 | State createState() => new _TransactionState(); 14 | 15 | } 16 | 17 | 18 | class _TransactionState extends State{ 19 | 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | 24 | return StoreConnector( 25 | converter: ViewModel.fromStore, 26 | builder: (context, vm){ 27 | //print("list all bills "+vm.bills.length.toString()); 28 | return RefreshIndicator( 29 | 30 | onRefresh: _handleRefresh, 31 | child: ListView.builder( 32 | itemCount: vm.bills != null ? vm.bills.length : 0, 33 | itemBuilder: (BuildContext context, int index){ 34 | final bill = vm.bills[index]; 35 | return GestureDetector( 36 | onTap: (){ 37 | print("detail : "+bill.id.toString()); 38 | StoreProvider.of(context).dispatch(InsertedIdBill(bill.id)); 39 | Navigator.push(context,MaterialPageRoute(builder: (context) => DetailBill(setUp: (){ 40 | StoreProvider.of(context).dispatch(GetDetailTranscationAction(idBill:bill.id)); 41 | },) 42 | )); 43 | 44 | }, 45 | child: ItemList( 46 | bill: bill, 47 | ), 48 | ); 49 | 50 | }, 51 | ), 52 | ); 53 | 54 | 55 | } 56 | ); 57 | } 58 | 59 | Future _handleRefresh() async { 60 | await new Future.delayed(new Duration(seconds: 2)); 61 | var action = LoadBills(); 62 | StoreProvider.of(context).dispatch(action); 63 | 64 | return null; 65 | } 66 | 67 | } 68 | 69 | class ViewModel{ 70 | final List bills; 71 | 72 | ViewModel({this.bills}); 73 | static ViewModel fromStore(Store store){ 74 | 75 | return new ViewModel(bills:store.state.bills); 76 | } 77 | 78 | } 79 | 80 | class ItemList extends StatelessWidget{ 81 | final Bill bill; 82 | ItemList({this.bill}); 83 | 84 | @override 85 | Widget build(BuildContext context) { 86 | int epoch = bill.date * 1000; 87 | var now = new DateTime.fromMicrosecondsSinceEpoch(epoch); 88 | var formatter = new DateFormat('dd-MM-yyy H:m'); 89 | String date = formatter.format(now); 90 | 91 | return Container( 92 | margin: new EdgeInsets.only(top: 8.0, left:16.0, right:16.0, bottom:8.0) , 93 | child: Column( 94 | crossAxisAlignment: CrossAxisAlignment.start, 95 | children: [ 96 | 97 | Text("Rp. "+bill.totalPrice.toString(), style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold)), 98 | Text("No bill : "+bill.id.toString()), 99 | Text(date), 100 | ], 101 | ) 102 | 103 | ); 104 | } 105 | 106 | } -------------------------------------------------------------------------------- /lib/db/db_helper.dart: -------------------------------------------------------------------------------- 1 | import 'package:redux_exercise/models/bill.dart'; 2 | import 'package:sqflite/sqflite.dart'; 3 | import 'dart:async'; 4 | import 'package:path/path.dart'; 5 | import 'package:redux_exercise/models/product.dart'; 6 | import 'package:redux_exercise/models/transaction.dart'; 7 | 8 | 9 | class DbHelper{ 10 | DbHelper._(); 11 | 12 | static final DbHelper db = DbHelper._(); 13 | 14 | Database _database; 15 | 16 | Future get database async{ 17 | if(_database != null) return _database; 18 | _database = await initDB(); 19 | return _database; 20 | } 21 | 22 | initDB() async{ 23 | var databasesPath = await getDatabasesPath(); 24 | String path = join(databasesPath, 'demo.db'); 25 | return await openDatabase(path, version: 2, onOpen: (db) {}, 26 | onCreate: (Database db, int version) async { 27 | await db.execute("CREATE TABLE Product (" 28 | "id INTEGER PRIMARY KEY," 29 | "product_name VARCHAR(40)," 30 | "qty INTEGER," 31 | "price INTEGER" 32 | ");"); 33 | 34 | await db.execute("CREATE TABLE ItemTransaction (" 35 | "id_transaction INTEGER PRIMARY KEY," 36 | "product_id INTEGER," 37 | "count INTEGER," 38 | "bill_id INTEGER," 39 | "item_price INTEGER" 40 | ");"); 41 | 42 | await db.execute("CREATE TABLE Bill (" 43 | "id_bill INTEGER PRIMARY KEY," 44 | "total_price INTEGER," 45 | "date INTEGER" 46 | ");"); 47 | 48 | }); 49 | } 50 | 51 | insertProduct(Product product) async{ 52 | 53 | final db = await database; 54 | var raw = await db.rawInsert( 55 | "INSERT into Product (product_name, qty, price) VALUES (?, ?, ?)", 56 | [product.name, product.qty, product.price] 57 | ); 58 | return raw; 59 | } 60 | 61 | insertTransaction(TransactionData transaction) async{ 62 | 63 | final db = await database; 64 | var raw = await db.rawInsert( 65 | "INSERT into ItemTransaction (product_id, count, bill_id, item_price) VALUES (?, ?, ?, ?)", 66 | [transaction.productId, transaction.count, transaction.billId, transaction.itemPrice] 67 | ); 68 | return raw; 69 | } 70 | 71 | insertBill(Bill bill) async{ 72 | 73 | final db = await database; 74 | var raw = await db.rawInsert( 75 | "INSERT into Bill (date, total_price) VALUES (?, ?)", 76 | [bill.date, bill.totalPrice] 77 | ); 78 | print("bill id "+raw.toString()); 79 | return raw; 80 | 81 | } 82 | 83 | 84 | Future> getAllproduct() async { 85 | final db = await database; 86 | var res = await db.rawQuery("SELECT * FROM Product"); 87 | print("load product "+res.isEmpty.toString()); 88 | List list =res.isNotEmpty ? res.map((c) => Product.fromMap(c)).toList() : []; 89 | 90 | return list; 91 | } 92 | 93 | Future> searchProduct(String name) async{ 94 | 95 | final db = await database; 96 | var res = await db.rawQuery("SELECT * FROM Product WHERE product_name like '%"+name+"%'"); 97 | List list =res.isNotEmpty ? res.map((c) => Product.fromMap(c)).toList() : []; 98 | 99 | return list; 100 | } 101 | 102 | 103 | Future getProduct(String name) async{ 104 | 105 | final db = await database; 106 | var res = await db.rawQuery("SELECT * FROM Product WHERE product_name ='"+name+"'"); 107 | List list =res.isNotEmpty ? res.map((c) => Product.fromMap(c)).toList() : []; 108 | 109 | return list[0]; 110 | } 111 | 112 | Future> getBills() async{ 113 | 114 | final db = await database; 115 | var res = await db.rawQuery("SELECT * FROM Bill"); 116 | List list =res.isNotEmpty ? res.map((c) => Bill.fromMap(c)).toList() : []; 117 | 118 | return list; 119 | } 120 | 121 | Future> getDetailTransaction(int idBill) async { 122 | final db = await database; 123 | var res = await db.rawQuery("SELECT id, product_id, count, item_price, bill_id, product.product_name as name FROM ItemTransaction INNER JOIN Product ON ItemTransaction.product_id = Product.id WHERE bill_id = "+idBill.toString()); 124 | List list =res.isNotEmpty ? res.map((c) => TransactionData.fromMap(c)).toList() : []; 125 | 126 | return list; 127 | 128 | } 129 | 130 | } -------------------------------------------------------------------------------- /lib/presentation/detail_bill.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_redux/flutter_redux.dart'; 3 | import 'package:redux/redux.dart'; 4 | import 'package:redux_exercise/models/app_state.dart'; 5 | import 'package:redux_exercise/models/transaction.dart'; 6 | 7 | 8 | 9 | class DetailBill extends StatefulWidget{ 10 | 11 | final Function setUp; 12 | DetailBill({this.setUp}); 13 | 14 | @override 15 | State createState() => new _DetailBillState(); 16 | 17 | } 18 | 19 | class _DetailBillState extends State{ 20 | 21 | var total = 0; 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return StoreConnector( 26 | converter: ViewModel.fromStore, 27 | builder: (context, vm){ 28 | var detailTransactionList = vm.transactions; 29 | if(detailTransactionList != null ){ 30 | print("Detail transaction : "+detailTransactionList.length.toString()); 31 | } 32 | detailTransactionList.forEach((p){ 33 | total+= p.itemPrice * p.count; 34 | }); 35 | 36 | return Scaffold( 37 | appBar: AppBar( 38 | title: Text("Detail Transaction"), 39 | ), 40 | body: Container( 41 | margin: 42 | EdgeInsets.only(left: 24.0, top: 16.0, right: 24.0, bottom: 16.0), 43 | child: Column( 44 | mainAxisAlignment: MainAxisAlignment.start, 45 | children: [ 46 | Row( 47 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 48 | children: [ 49 | Expanded( 50 | child: Text("Product", 51 | style: TextStyle( 52 | fontSize: 16.0, fontWeight: FontWeight.bold))), 53 | Expanded( 54 | child: Text("Price", 55 | style: TextStyle( 56 | fontSize: 16.0, fontWeight: FontWeight.bold))) 57 | ], 58 | ), 59 | ListView.builder( 60 | shrinkWrap: true, 61 | itemCount: detailTransactionList.length, 62 | itemBuilder: (BuildContext ctxt, int index) { 63 | 64 | var totalItem = detailTransactionList[index].itemPrice; 65 | 66 | var price = "(x" + 67 | detailTransactionList[index].count.toString() + 68 | ") Rp." + 69 | totalItem.toString(); 70 | var name = detailTransactionList[index].productName.toString(); 71 | 72 | print("item " + price.toString()); 73 | return Padding( 74 | padding: const EdgeInsets.only( 75 | left: 0, top: 5.0, right: 0, bottom: 5.0), 76 | child: Row( 77 | children: [ 78 | Expanded( 79 | child: 80 | Text(name, style: TextStyle(fontSize: 16.0))), 81 | Expanded( 82 | child: 83 | Text(price, style: TextStyle(fontSize: 16.0))), 84 | ], 85 | ), 86 | ); 87 | } 88 | ), 89 | Row( 90 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 91 | children: [ 92 | Expanded( 93 | child: Text("Total", 94 | style: TextStyle( 95 | fontSize: 16.0, fontWeight: FontWeight.bold))), 96 | Expanded( 97 | child: Text("Rp." + total.toString(), 98 | style: TextStyle( 99 | fontSize: 16.0, fontWeight: FontWeight.bold))) 100 | ], 101 | ) 102 | ] 103 | ), 104 | ) 105 | ); 106 | 107 | }); 108 | } 109 | 110 | 111 | } 112 | 113 | class ViewModel{ 114 | final List transactions; 115 | 116 | ViewModel({this.transactions}); 117 | static ViewModel fromStore(Store store){ 118 | 119 | return new ViewModel(transactions:store.state.transactions); 120 | } 121 | 122 | } -------------------------------------------------------------------------------- /lib/middleware/app_middleware.dart: -------------------------------------------------------------------------------- 1 | import 'package:redux/redux.dart'; 2 | import 'package:redux_exercise/models/app_state.dart'; 3 | import 'package:redux_exercise/repository/data_repo.dart'; 4 | import 'package:redux_exercise/repository/local_repository.dart'; 5 | import 'package:redux_exercise/actions/action.dart'; 6 | 7 | var billId = 0; 8 | 9 | List> createStoreMiddleware([ 10 | DataRepository dataRepo = const LocalRepository() 11 | ]){ 12 | 13 | final saveProduct = _createProduct(dataRepo); 14 | final loadProducts = _loadProducts(dataRepo); 15 | final searchProducts = _searchProduct(dataRepo); 16 | final getProduct = _getProduct(dataRepo); 17 | final saveTransaction = _saveTransaction(dataRepo); 18 | final saveBill = _saveBill(dataRepo); 19 | final getBills = _getBills(dataRepo); 20 | final getTransactions = _getTransactions(dataRepo); 21 | 22 | return[ 23 | TypedMiddleware(saveProduct), 24 | TypedMiddleware(loadProducts), 25 | TypedMiddleware(searchProducts), 26 | TypedMiddleware(saveTransaction), 27 | TypedMiddleware(getProduct), 28 | TypedMiddleware(saveBill), 29 | TypedMiddleware(getBills), 30 | TypedMiddleware(getTransactions), 31 | ]; 32 | } 33 | 34 | Middleware _createProduct(DataRepository dataRepo){ 35 | return (Store store, action, NextDispatcher next) { 36 | next(action); 37 | final allProduct = store.state.products; 38 | 39 | final product = allProduct[allProduct.length-1]; 40 | print("save product qty : "+product.qty.toString()+" price : "+product.price.toString()); 41 | dataRepo.saveProduct( 42 | product 43 | ); 44 | }; 45 | } 46 | 47 | Middleware _saveTransaction(DataRepository dataRepo){ 48 | return (Store store, action, NextDispatcher next) { 49 | next(action); 50 | var idBill = store.state.idBill; 51 | var idproduct =store.state.transactions[0].productId; 52 | print("save id id bill "+idBill.toString()+" id product "+idproduct.toString()); 53 | dataRepo.saveItemTransaction(store.state.transactions); 54 | }; 55 | } 56 | 57 | Middleware _saveBill(DataRepository dataRepo){ 58 | return (Store store, action, NextDispatcher next) { 59 | next(action); 60 | dataRepo.saveBill(store.state.insertedBill).then( (id) { 61 | print("save id bill "+id.toString()); 62 | //store.dispatch(InsertedIdBill(id)); 63 | 64 | var list =store.state.transactions; 65 | list.forEach((transaction){ 66 | transaction.billId = id; 67 | }); 68 | store.dispatch(TransactionLoadedAction(list)); 69 | 70 | } 71 | ); 72 | }; 73 | } 74 | 75 | 76 | Middleware _loadProducts(DataRepository dataRepo){ 77 | return (Store store, action, NextDispatcher next) { 78 | next(action); 79 | 80 | dataRepo.loadAllProducts().then( 81 | (products){ 82 | products.forEach((p){ 83 | print("pruduct all "+p.id.toString()); 84 | }); 85 | store.dispatch( 86 | ProductLoadedAction( 87 | products 88 | ) 89 | ); 90 | } 91 | ); 92 | }; 93 | } 94 | 95 | Middleware _getBills(DataRepository dataRepo){ 96 | return (Store store, action, NextDispatcher next) { 97 | next(action); 98 | dataRepo.getBills().then( 99 | (bills){ 100 | store.dispatch(BillLoadedAction(bills)); 101 | } 102 | ); 103 | }; 104 | } 105 | 106 | Middleware _getTransactions(DataRepository dataRepo){ 107 | return (Store store, action, NextDispatcher next) { 108 | next(action); 109 | dataRepo.getTransactionDetail(store.state.idBill).then( 110 | (products){ 111 | store.dispatch( 112 | TransactionLoadedAction(products) 113 | ); 114 | } 115 | ); 116 | }; 117 | } 118 | 119 | Middleware _searchProduct(DataRepository dataRepo){ 120 | return (Store store, action, NextDispatcher next) { 121 | next(action); 122 | print("load product"); 123 | dataRepo.searchProducts(store.state.query); 124 | }; 125 | 126 | } 127 | 128 | Middleware _getProduct(DataRepository dataRepo){ 129 | return (Store store, action, NextDispatcher next) { 130 | next(action); 131 | print("get product"); 132 | dataRepo.getProducts(store.state.query).then( 133 | (product){ 134 | store.dispatch( 135 | GetOneProductAction(product) 136 | ); 137 | } 138 | ); 139 | }; 140 | 141 | } -------------------------------------------------------------------------------- /lib/presentation/form_product.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_redux/flutter_redux.dart'; 3 | import 'package:redux/redux.dart'; 4 | import 'package:redux_exercise/actions/action.dart'; 5 | import 'package:redux_exercise/models/app_state.dart'; 6 | import 'package:redux_exercise/models/product.dart'; 7 | 8 | class AddProductForm extends StatelessWidget{ 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | 13 | return StoreConnector( 14 | converter: (Store store){ 15 | return (name, prize, qty ){ 16 | print("Name "+name+" prize "+prize.toString()+" qty "+qty.toString()); 17 | store.dispatch(AddProductAction(Product(id:0, 18 | name:name, 19 | price:prize, 20 | qty:qty 21 | ))); 22 | }; 23 | }, 24 | builder: (context, onSave){ 25 | return FormAddProduct( 26 | onSave: onSave, 27 | ); 28 | }, 29 | ); 30 | 31 | } 32 | 33 | 34 | } 35 | 36 | typedef OnSaveCallback = Function(String name, int prize, int qty); 37 | 38 | class FormAddProduct extends StatefulWidget{ 39 | final OnSaveCallback onSave; 40 | FormAddProduct({this.onSave}); 41 | 42 | @override 43 | _FormAddProduct createState() => new _FormAddProduct(); 44 | 45 | } 46 | class _FormAddProduct extends State{ 47 | 48 | final formKey = GlobalKey(); 49 | 50 | final productNameController = new TextEditingController(); 51 | final productPrizeController = new TextEditingController(); 52 | final productQtyController = new TextEditingController(); 53 | String name = ""; 54 | String price = ""; 55 | String qty = ""; 56 | 57 | @override 58 | Widget build(BuildContext context) { 59 | return Scaffold( 60 | appBar: AppBar( 61 | title: Text("Add Product"), 62 | ), 63 | body: Container( 64 | margin: EdgeInsets.all(16.0), 65 | child: Form( 66 | key: formKey, 67 | child: Column( 68 | children: [ 69 | TextFormField( 70 | controller: productNameController, 71 | decoration: const InputDecoration( 72 | hintText: "Product Name", 73 | labelText:"Product Name" 74 | ), 75 | keyboardType: TextInputType.text, 76 | onSaved: (String text){ 77 | this.name = text; 78 | }, 79 | 80 | ), 81 | 82 | TextFormField( 83 | controller: productPrizeController, 84 | decoration: const InputDecoration( 85 | hintText: "Price", 86 | labelText:"Price" 87 | ), 88 | keyboardType: TextInputType.number, 89 | onSaved: (String text){ 90 | this.price = text; 91 | }, 92 | 93 | ), 94 | 95 | TextFormField( 96 | controller: productQtyController, 97 | decoration: const InputDecoration( 98 | hintText: "Qty", 99 | labelText:"Qty" 100 | ), 101 | keyboardType: TextInputType.number, 102 | onSaved: (String text){ 103 | this.qty = text; 104 | }, 105 | ), 106 | 107 | new Container( 108 | child: new RaisedButton( 109 | child: new Text( 110 | 'Add', 111 | style: new TextStyle( 112 | color: Colors.white 113 | ), 114 | ), 115 | onPressed: () { 116 | name = productNameController.text; 117 | qty = productQtyController.text; 118 | price = productPrizeController.text; 119 | print("NAME INPUT : "+name+" : "+qty+" : "+price); 120 | widget.onSave(productNameController.text, int.parse(productPrizeController.text), int.parse(productQtyController.text)); 121 | 122 | productNameController.text = ""; 123 | productQtyController.text = ""; 124 | productPrizeController.text = ""; 125 | }, 126 | color: Colors.blue, 127 | ), 128 | margin: new EdgeInsets.only( 129 | top: 30.0 130 | ), 131 | ) 132 | 133 | ], 134 | ) 135 | ) 136 | ), 137 | ); 138 | } 139 | 140 | } 141 | -------------------------------------------------------------------------------- /lib/presentation/home_screen.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/widgets.dart'; 4 | import 'package:flutter_redux/flutter_redux.dart'; 5 | import 'package:redux/redux.dart'; 6 | import 'package:redux_exercise/actions/action.dart'; 7 | import 'package:redux_exercise/models/app_route.dart'; 8 | import 'package:redux_exercise/models/app_state.dart'; 9 | import 'package:redux_exercise/models/product.dart'; 10 | import 'package:redux_exercise/presentation/transaction_view.dart'; 11 | import 'package:redux_exercise/presentation/form_transaction.dart'; 12 | 13 | class HomeScreen extends StatefulWidget{ 14 | 15 | final Function onInit; 16 | HomeScreen({this.onInit}); 17 | 18 | @override 19 | _HomeScreen createState() => _HomeScreen(); 20 | 21 | 22 | } 23 | 24 | class _HomeScreen extends State{ 25 | 26 | final List listWidget = [ 27 | TransactionView(), 28 | Home() 29 | ]; 30 | 31 | var selectedId = 0; 32 | var titleButton = "Add Transaction"; 33 | 34 | @override 35 | void initState() { 36 | widget.onInit(); 37 | super.initState(); 38 | } 39 | 40 | @override 41 | Widget build(BuildContext context) { 42 | return Scaffold( 43 | appBar: AppBar( 44 | title: Text("fPOS"), 45 | ), 46 | body: Scaffold( 47 | body : listWidget[selectedId], 48 | bottomNavigationBar: BottomNavigationBar( 49 | currentIndex: selectedId, 50 | items: [ 51 | BottomNavigationBarItem( 52 | icon: Icon(Icons.assignment), 53 | title: Text("Transaction") 54 | ), 55 | BottomNavigationBarItem( 56 | icon: Icon(Icons.fastfood), 57 | title: Text('Product') 58 | ), 59 | ], 60 | onTap: (index){ 61 | setState(() { 62 | selectedId = index; 63 | if(index == 0) 64 | titleButton = "Add Transaction"; 65 | else 66 | titleButton = "Add Product"; 67 | 68 | }); 69 | }, 70 | ), 71 | floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, 72 | floatingActionButton: FloatingActionButton.extended( 73 | elevation: 4.0, 74 | icon: const Icon(Icons.add), 75 | label: Text(titleButton, style: TextStyle(fontSize: 12.0),), 76 | onPressed: (){ 77 | if(selectedId == 0){ 78 | //Navigator.pushNamed(context, AppRoute.addTransaction); 79 | Navigator.push(context,MaterialPageRoute(builder: (context) => DataTransaction(setUp: (){ 80 | StoreProvider.of(context).dispatch(LoadProductAction()); 81 | }, 82 | ) 83 | )); 84 | }else 85 | Navigator.pushNamed(context, AppRoute.addProduct); 86 | }, 87 | ), 88 | ), 89 | 90 | ); 91 | } 92 | 93 | } 94 | 95 | 96 | class Home extends StatefulWidget{ 97 | Home({Key key}) : super(key: key); 98 | @override 99 | _Home createState() => _Home(); 100 | 101 | } 102 | 103 | class _Home extends State{ 104 | 105 | @override 106 | void initState() { 107 | super.initState(); 108 | } 109 | 110 | @override 111 | Widget build(BuildContext context) { 112 | return StoreConnector( 113 | converter: _ViewModel.fromStore, 114 | builder: (context, vm){ 115 | return ListView.builder( 116 | itemCount: vm.products.length, 117 | itemBuilder: (BuildContext context, int index){ 118 | 119 | final product = vm.products[index]; 120 | return ItemList( 121 | product: product, 122 | ); 123 | }, 124 | ); 125 | } 126 | ); 127 | } 128 | 129 | } 130 | 131 | 132 | class _ViewModel{ 133 | final List products; 134 | final Product product; 135 | final bool isLoading; 136 | _ViewModel({ 137 | @required this.isLoading, 138 | @required this.products, 139 | @required this.product 140 | }); 141 | 142 | static _ViewModel fromStore(Store store){ 143 | //print("list store : "+store.state.products.length.toString()); 144 | store.state.products.forEach((product) { 145 | print("product : "+product.id.toString()+" name : "+product.name); 146 | }); 147 | 148 | return _ViewModel( 149 | isLoading: store.state.isLoading, 150 | products: store.state.products, 151 | product: store.state.product 152 | ); 153 | } 154 | } 155 | 156 | class ItemList extends StatelessWidget{ 157 | final Product product; 158 | ItemList({this.product}); 159 | 160 | @override 161 | Widget build(BuildContext context) { 162 | 163 | return Container( 164 | margin: new EdgeInsets.only(top: 8.0, left:16.0, right:16.0, bottom:8.0) , 165 | child: Column( 166 | crossAxisAlignment: CrossAxisAlignment.start, 167 | children: [ 168 | Text(product.name, style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold)), 169 | Text("Rp. "+product.price.toString()), 170 | Text("Qty : "+product.qty.toString()), 171 | ], 172 | ) 173 | 174 | ); 175 | } 176 | 177 | } 178 | 179 | -------------------------------------------------------------------------------- /lib/presentation/bottomsheet.dart: -------------------------------------------------------------------------------- 1 | //Flutter Modal Bottom Sheet 2 | //Modified by Suvadeep Das 3 | //Based on https://gist.github.com/andrelsmoraes/9e4af0133bff8960c1feeb0ead7fd749 4 | 5 | import 'dart:async'; 6 | 7 | import 'package:flutter/material.dart'; 8 | import 'package:meta/meta.dart'; 9 | 10 | const Duration _kBottomSheetDuration = const Duration(milliseconds: 200); 11 | 12 | class _ModalBottomSheetLayout extends SingleChildLayoutDelegate { 13 | _ModalBottomSheetLayout(this.progress, this.bottomInset); 14 | 15 | final double progress; 16 | final double bottomInset; 17 | 18 | @override 19 | BoxConstraints getConstraintsForChild(BoxConstraints constraints) { 20 | return new BoxConstraints( 21 | minWidth: constraints.maxWidth, 22 | maxWidth: constraints.maxWidth, 23 | minHeight: 0.0, 24 | maxHeight: constraints.maxHeight 25 | ); 26 | } 27 | 28 | @override 29 | Offset getPositionForChild(Size size, Size childSize) { 30 | return new Offset(0.0, size.height - bottomInset - childSize.height * progress); 31 | } 32 | 33 | @override 34 | bool shouldRelayout(_ModalBottomSheetLayout oldDelegate) { 35 | return progress != oldDelegate.progress || bottomInset != oldDelegate.bottomInset; 36 | } 37 | } 38 | 39 | class _ModalBottomSheet extends StatefulWidget { 40 | const _ModalBottomSheet({ Key key, this.route }) : super(key: key); 41 | 42 | final _ModalBottomSheetRoute route; 43 | 44 | @override 45 | _ModalBottomSheetState createState() => new _ModalBottomSheetState(); 46 | } 47 | 48 | class _ModalBottomSheetState extends State<_ModalBottomSheet> { 49 | @override 50 | Widget build(BuildContext context) { 51 | return new GestureDetector( 52 | onTap: widget.route.dismissOnTap ? () => Navigator.pop(context) : null, 53 | child: new AnimatedBuilder( 54 | animation: widget.route.animation, 55 | builder: (BuildContext context, Widget child) { 56 | double bottomInset = widget.route.resizeToAvoidBottomPadding 57 | ? MediaQuery.of(context).viewInsets.bottom : 0.0; 58 | return new ClipRect( 59 | child: new CustomSingleChildLayout( 60 | delegate: new _ModalBottomSheetLayout(widget.route.animation.value, bottomInset), 61 | child: new BottomSheet( 62 | animationController: widget.route._animationController, 63 | onClosing: () => Navigator.pop(context), 64 | builder: widget.route.builder 65 | ) 66 | ) 67 | ); 68 | } 69 | ) 70 | ); 71 | } 72 | } 73 | 74 | class _ModalBottomSheetRoute extends PopupRoute { 75 | _ModalBottomSheetRoute({ 76 | this.builder, 77 | this.theme, 78 | this.barrierLabel, 79 | RouteSettings settings, 80 | this.resizeToAvoidBottomPadding, 81 | this.dismissOnTap, 82 | }) : super(settings: settings); 83 | 84 | final WidgetBuilder builder; 85 | final ThemeData theme; 86 | final bool resizeToAvoidBottomPadding; 87 | final bool dismissOnTap; 88 | 89 | @override 90 | Duration get transitionDuration => _kBottomSheetDuration; 91 | 92 | @override 93 | bool get barrierDismissible => false; 94 | 95 | @override 96 | final String barrierLabel; 97 | 98 | @override 99 | Color get barrierColor => Colors.black54; 100 | 101 | AnimationController _animationController; 102 | 103 | @override 104 | AnimationController createAnimationController() { 105 | assert(_animationController == null); 106 | _animationController = BottomSheet.createAnimationController(navigator.overlay); 107 | return _animationController; 108 | } 109 | 110 | @override 111 | Widget buildPage(BuildContext context, Animation animation, Animation secondaryAnimation) { 112 | // By definition, the bottom sheet is aligned to the bottom of the page 113 | // and isn't exposed to the top padding of the MediaQuery. 114 | Widget bottomSheet = new MediaQuery.removePadding( 115 | context: context, 116 | removeTop: true, 117 | child: new _ModalBottomSheet(route: this), 118 | ); 119 | if (theme != null) 120 | bottomSheet = new Theme(data: theme, child: bottomSheet); 121 | return bottomSheet; 122 | } 123 | } 124 | 125 | /// Shows a modal material design bottom sheet. 126 | /// 127 | /// A modal bottom sheet is an alternative to a menu or a dialog and prevents 128 | /// the user from interacting with the rest of the app. 129 | /// 130 | /// A closely related widget is a persistent bottom sheet, which shows 131 | /// information that supplements the primary content of the app without 132 | /// preventing the use from interacting with the app. Persistent bottom sheets 133 | /// can be created and displayed with the [showBottomSheet] function or the 134 | /// [ScaffoldState.showBottomSheet] method. 135 | /// 136 | /// The `context` argument is used to look up the [Navigator] and [Theme] for 137 | /// the bottom sheet. It is only used when the method is called. Its 138 | /// corresponding widget can be safely removed from the tree before the bottom 139 | /// sheet is closed. 140 | /// 141 | /// Returns a `Future` that resolves to the value (if any) that was passed to 142 | /// [Navigator.pop] when the modal bottom sheet was closed. 143 | /// 144 | /// See also: 145 | /// 146 | /// * [BottomSheet], which is the widget normally returned by the function 147 | /// passed as the `builder` argument to [showModalBottomSheet]. 148 | /// * [showBottomSheet] and [ScaffoldState.showBottomSheet], for showing 149 | /// non-modal bottom sheets. 150 | /// * 151 | Future showModalBottomSheetApp({ 152 | @required BuildContext context, 153 | @required WidgetBuilder builder, 154 | bool dismissOnTap: false, 155 | bool resizeToAvoidBottomPadding : true, 156 | }) { 157 | assert(context != null); 158 | assert(builder != null); 159 | return Navigator.push(context, new _ModalBottomSheetRoute( 160 | builder: builder, 161 | theme: Theme.of(context, shadowThemeOnly: true), 162 | barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel, 163 | resizeToAvoidBottomPadding: resizeToAvoidBottomPadding, 164 | dismissOnTap: dismissOnTap, 165 | )); 166 | } -------------------------------------------------------------------------------- /lib/presentation/form_transaction.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/widgets.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:autocomplete_textfield/autocomplete_textfield.dart'; 4 | import 'package:flutter_redux/flutter_redux.dart'; 5 | import 'package:redux/redux.dart'; 6 | import 'package:redux_exercise/actions/action.dart'; 7 | import 'package:redux_exercise/models/app_state.dart'; 8 | import 'package:redux_exercise/models/bill.dart'; 9 | import 'package:redux_exercise/models/product.dart'; 10 | import 'package:redux_exercise/models/transaction.dart'; 11 | import 'package:redux_exercise/presentation/bottomsheet.dart'; 12 | 13 | typedef OnSaveCallback = Function(List products, int total); 14 | 15 | class DataTransaction extends StatelessWidget{ 16 | 17 | final Function setUp; 18 | 19 | DataTransaction({this.setUp}); 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | 24 | return StoreConnector( 25 | converter: (Store store){ 26 | return (list, total){ 27 | print("list product "+list.length.toString()); 28 | var date = new DateTime.now().millisecondsSinceEpoch; 29 | var bill = new Bill(id:0, date:date, totalPrice: total); 30 | 31 | 32 | var listTransaction = List(); 33 | 34 | for(int i=0; i < list.length ; i++){ 35 | var product =list[i]; 36 | var itemCount =product.qty * product.price; 37 | print("PRODUCT ID "+product.id.toString()); 38 | var transc = new TransactionData(id: i, productId: product.id, count: product.qty, itemPrice: itemCount); 39 | listTransaction.add(transc); 40 | } 41 | 42 | store.dispatch(BillInsertAction(bill, listTransaction)); 43 | 44 | }; 45 | }, 46 | builder: (context, onSave){ 47 | return FormTransaction( 48 | onSave: onSave, 49 | ); 50 | }, 51 | ); 52 | } 53 | 54 | } 55 | 56 | 57 | 58 | 59 | class FormTransaction extends StatefulWidget { 60 | 61 | final OnSaveCallback onSave; 62 | 63 | FormTransaction({this.onSave}); 64 | 65 | @override 66 | _Transaction createState() => new _Transaction(); 67 | } 68 | 69 | class _Transaction extends State { 70 | static GlobalKey> key = new GlobalKey(); 71 | var textCurrent = ""; 72 | String qty = ""; 73 | final productQtyController = new TextEditingController(); 74 | final productAController = new TextEditingController(); 75 | final GlobalKey _scaffoldKey = new GlobalKey(); 76 | 77 | List lisProduct = List(); 78 | List localProductList = List(); 79 | 80 | var totalNota = 0; 81 | 82 | @override 83 | void initState() { 84 | print("started " + localProductList.length.toString()); 85 | super.initState(); 86 | } 87 | 88 | @override 89 | Widget build(BuildContext context) { 90 | List names = List(); 91 | localProductList = StoreProvider.of(context).state.products; 92 | localProductList.forEach((d){ 93 | print("id product "+d.id.toString()); 94 | names.add(d.name); 95 | }); 96 | 97 | return Scaffold( 98 | key: _scaffoldKey, 99 | appBar: AppBar( 100 | title: Text("Transaction"), 101 | actions: [ 102 | IconButton( 103 | icon: Text("save"), 104 | onPressed: () { 105 | if (lisProduct.length > 0) { 106 | Navigator.of(context) 107 | .push(MaterialPageRoute(builder: (context) { 108 | return Scaffold( 109 | backgroundColor: Colors.black.withOpacity(0.75), 110 | body:Center( 111 | child:CircularProgressIndicator(), 112 | ), 113 | ); 114 | })); 115 | 116 | widget.onSave(lisProduct, countTotal()); 117 | 118 | Navigator.pop(context); 119 | Navigator.pop(context); 120 | } 121 | }, 122 | ) 123 | ], 124 | ), 125 | body: Container( 126 | margin: 127 | EdgeInsets.only(left: 24.0, top: 16.0, right: 24.0, bottom: 16.0), 128 | child: Column( 129 | mainAxisAlignment: MainAxisAlignment.start, 130 | children: [ 131 | Row( 132 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 133 | children: [ 134 | Expanded( 135 | child: Text("Product", 136 | style: TextStyle( 137 | fontSize: 16.0, fontWeight: FontWeight.bold))), 138 | Expanded( 139 | child: Text("Price", 140 | style: TextStyle( 141 | fontSize: 16.0, fontWeight: FontWeight.bold))) 142 | ], 143 | ), 144 | ListView.builder( 145 | shrinkWrap: true, 146 | itemCount: lisProduct.length, 147 | itemBuilder: (BuildContext ctxt, int index) { 148 | var totalItem = lisProduct[index].price; 149 | var price = "(x" + 150 | lisProduct[index].qty.toString() + 151 | ") Rp." + 152 | totalItem.toString(); 153 | var name = lisProduct[index].name; 154 | 155 | print("item " + price.toString()); 156 | return Padding( 157 | padding: const EdgeInsets.only( 158 | left: 0, top: 5.0, right: 0, bottom: 5.0), 159 | child: Row( 160 | children: [ 161 | Expanded( 162 | child: 163 | Text(name, style: TextStyle(fontSize: 16.0))), 164 | Expanded( 165 | child: 166 | Text(price, style: TextStyle(fontSize: 16.0))), 167 | ], 168 | ), 169 | ); 170 | }, 171 | ), 172 | Row( 173 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 174 | children: [ 175 | Expanded( 176 | child: Text("Total", 177 | style: TextStyle( 178 | fontSize: 16.0, fontWeight: FontWeight.bold))), 179 | Expanded( 180 | child: Text("Rp" + totalNota.toString(), 181 | style: TextStyle( 182 | fontSize: 16.0, fontWeight: FontWeight.bold))) 183 | ], 184 | ) 185 | ], 186 | )), 187 | floatingActionButton: FloatingActionButton( 188 | child: Icon(Icons.add), 189 | onPressed: () { 190 | showModalBottomSheetApp( 191 | context: context, 192 | builder: (BuildContext builder) { 193 | return SizedBox( 194 | height: 250.0, 195 | child: Container( 196 | padding: new EdgeInsets.all(16.0), 197 | child: Column( 198 | children: [ 199 | new Text( 200 | 'Add Product', 201 | style: TextStyle(fontSize: 16.0), 202 | ), 203 | new SimpleAutoCompleteTextField( 204 | key: key, 205 | suggestions: names, 206 | decoration: const InputDecoration( 207 | hintText: "Product Name", 208 | labelText: "Product Name", 209 | ), 210 | //textChanged: (text) => this.textCurrent = text, 211 | textSubmitted: (text) => setState(() { 212 | this.textCurrent = text; 213 | }), 214 | clearOnSubmit: false, 215 | submitOnSuggestionTap: true, 216 | ), 217 | TextField( 218 | controller: productQtyController, 219 | keyboardType: TextInputType.numberWithOptions(), 220 | decoration: const InputDecoration( 221 | hintText: "Qty", labelText: "Qty"), 222 | ), 223 | Container( 224 | child: RaisedButton( 225 | child: new Text( 226 | 'Save', 227 | style: new TextStyle(color: Colors.blue), 228 | ), 229 | onPressed: () { 230 | //Navigator.pop(context); 231 | setState(() { 232 | var id = getProductByName(textCurrent).id; 233 | var price = 234 | getProductByName(textCurrent).price; 235 | var qty = 236 | int.parse(productQtyController.text); 237 | print("qty " + qty.toString()); 238 | var product = Product(); 239 | product.setData(id, textCurrent, price, qty); 240 | print("Produt add id "+product.id.toString()); 241 | lisProduct.add(product); 242 | totalNota = countTotal(); 243 | Navigator.pop(context); 244 | }); 245 | }, 246 | ), 247 | ), 248 | ], 249 | ), 250 | )); 251 | }); 252 | }, 253 | ), 254 | ); 255 | } 256 | 257 | Product getProductByName(String name) { 258 | Product p = Product(); 259 | for (Product product in localProductList) { 260 | if (product.name == name) { 261 | p = product; 262 | } 263 | } 264 | return p; 265 | } 266 | 267 | bool isAnyResult() { 268 | bool anyTotal = false; 269 | for (Product product in localProductList) { 270 | if (product.id == 0) anyTotal = true; 271 | } 272 | return anyTotal; 273 | } 274 | 275 | int countTotal() { 276 | var count = 0; 277 | for (Product product in lisProduct) { 278 | print("qty : " + 279 | product.qty.toString() + 280 | " price : " + 281 | product.price.toString()); 282 | var item = (product.qty * product.price); 283 | count += item; 284 | } 285 | print("total count : " + 286 | count.toString() + 287 | " " + 288 | lisProduct.length.toString()); 289 | return count; 290 | } 291 | } 292 | 293 | class ProductList extends StatelessWidget{ 294 | @override 295 | Widget build(BuildContext context) { 296 | 297 | return null; 298 | } 299 | 300 | } 301 | 302 | 303 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 14 | 46F3AA1EDBB490D81E0DF722 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B04E83D9353DEE21CECBEA9A /* libPods-Runner.a */; }; 15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 17 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 18 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 19 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 20 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 21 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 22 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXCopyFilesBuildPhase section */ 26 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 27 | isa = PBXCopyFilesBuildPhase; 28 | buildActionMask = 2147483647; 29 | dstPath = ""; 30 | dstSubfolderSpec = 10; 31 | files = ( 32 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 33 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 34 | ); 35 | name = "Embed Frameworks"; 36 | runOnlyForDeploymentPostprocessing = 0; 37 | }; 38 | /* End PBXCopyFilesBuildPhase section */ 39 | 40 | /* Begin PBXFileReference section */ 41 | 075AD7AACA79A9A09F88A6D7 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 42 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 43 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 44 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 45 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 46 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 47 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 48 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 49 | 7F4E37F81B46690210EB6766 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 50 | 8A48BB9E7D7D2E449144EF39 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 51 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 52 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 53 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 54 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 55 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 56 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 57 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 58 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 59 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 60 | B04E83D9353DEE21CECBEA9A /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 61 | /* End PBXFileReference section */ 62 | 63 | /* Begin PBXFrameworksBuildPhase section */ 64 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 65 | isa = PBXFrameworksBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 69 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 70 | 46F3AA1EDBB490D81E0DF722 /* libPods-Runner.a in Frameworks */, 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | /* End PBXFrameworksBuildPhase section */ 75 | 76 | /* Begin PBXGroup section */ 77 | 3FAB2AE09029AF9F6C41730A /* Frameworks */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | B04E83D9353DEE21CECBEA9A /* libPods-Runner.a */, 81 | ); 82 | name = Frameworks; 83 | sourceTree = ""; 84 | }; 85 | 9740EEB11CF90186004384FC /* Flutter */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | 3B80C3931E831B6300D905FE /* App.framework */, 89 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 90 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 91 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 92 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 93 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 94 | ); 95 | name = Flutter; 96 | sourceTree = ""; 97 | }; 98 | 97C146E51CF9000F007C117D = { 99 | isa = PBXGroup; 100 | children = ( 101 | 9740EEB11CF90186004384FC /* Flutter */, 102 | 97C146F01CF9000F007C117D /* Runner */, 103 | 97C146EF1CF9000F007C117D /* Products */, 104 | AD53D3CCE0CC450B61E46993 /* Pods */, 105 | 3FAB2AE09029AF9F6C41730A /* Frameworks */, 106 | ); 107 | sourceTree = ""; 108 | }; 109 | 97C146EF1CF9000F007C117D /* Products */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | 97C146EE1CF9000F007C117D /* Runner.app */, 113 | ); 114 | name = Products; 115 | sourceTree = ""; 116 | }; 117 | 97C146F01CF9000F007C117D /* Runner */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, 121 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 122 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 123 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 124 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 125 | 97C147021CF9000F007C117D /* Info.plist */, 126 | 97C146F11CF9000F007C117D /* Supporting Files */, 127 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 128 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 129 | ); 130 | path = Runner; 131 | sourceTree = ""; 132 | }; 133 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 134 | isa = PBXGroup; 135 | children = ( 136 | 97C146F21CF9000F007C117D /* main.m */, 137 | ); 138 | name = "Supporting Files"; 139 | sourceTree = ""; 140 | }; 141 | AD53D3CCE0CC450B61E46993 /* Pods */ = { 142 | isa = PBXGroup; 143 | children = ( 144 | 075AD7AACA79A9A09F88A6D7 /* Pods-Runner.debug.xcconfig */, 145 | 8A48BB9E7D7D2E449144EF39 /* Pods-Runner.release.xcconfig */, 146 | 7F4E37F81B46690210EB6766 /* Pods-Runner.profile.xcconfig */, 147 | ); 148 | name = Pods; 149 | path = Pods; 150 | sourceTree = ""; 151 | }; 152 | /* End PBXGroup section */ 153 | 154 | /* Begin PBXNativeTarget section */ 155 | 97C146ED1CF9000F007C117D /* Runner */ = { 156 | isa = PBXNativeTarget; 157 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 158 | buildPhases = ( 159 | 21865126E1F740BF6FE212AE /* [CP] Check Pods Manifest.lock */, 160 | 9740EEB61CF901F6004384FC /* Run Script */, 161 | 97C146EA1CF9000F007C117D /* Sources */, 162 | 97C146EB1CF9000F007C117D /* Frameworks */, 163 | 97C146EC1CF9000F007C117D /* Resources */, 164 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 165 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 166 | BF494019249038ED8284C494 /* [CP] Embed Pods Frameworks */, 167 | ); 168 | buildRules = ( 169 | ); 170 | dependencies = ( 171 | ); 172 | name = Runner; 173 | productName = Runner; 174 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 175 | productType = "com.apple.product-type.application"; 176 | }; 177 | /* End PBXNativeTarget section */ 178 | 179 | /* Begin PBXProject section */ 180 | 97C146E61CF9000F007C117D /* Project object */ = { 181 | isa = PBXProject; 182 | attributes = { 183 | LastUpgradeCheck = 0910; 184 | ORGANIZATIONNAME = "The Chromium Authors"; 185 | TargetAttributes = { 186 | 97C146ED1CF9000F007C117D = { 187 | CreatedOnToolsVersion = 7.3.1; 188 | }; 189 | }; 190 | }; 191 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 192 | compatibilityVersion = "Xcode 3.2"; 193 | developmentRegion = English; 194 | hasScannedForEncodings = 0; 195 | knownRegions = ( 196 | en, 197 | Base, 198 | ); 199 | mainGroup = 97C146E51CF9000F007C117D; 200 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 201 | projectDirPath = ""; 202 | projectRoot = ""; 203 | targets = ( 204 | 97C146ED1CF9000F007C117D /* Runner */, 205 | ); 206 | }; 207 | /* End PBXProject section */ 208 | 209 | /* Begin PBXResourcesBuildPhase section */ 210 | 97C146EC1CF9000F007C117D /* Resources */ = { 211 | isa = PBXResourcesBuildPhase; 212 | buildActionMask = 2147483647; 213 | files = ( 214 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 215 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 216 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 217 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 218 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 219 | ); 220 | runOnlyForDeploymentPostprocessing = 0; 221 | }; 222 | /* End PBXResourcesBuildPhase section */ 223 | 224 | /* Begin PBXShellScriptBuildPhase section */ 225 | 21865126E1F740BF6FE212AE /* [CP] Check Pods Manifest.lock */ = { 226 | isa = PBXShellScriptBuildPhase; 227 | buildActionMask = 2147483647; 228 | files = ( 229 | ); 230 | inputFileListPaths = ( 231 | ); 232 | inputPaths = ( 233 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 234 | "${PODS_ROOT}/Manifest.lock", 235 | ); 236 | name = "[CP] Check Pods Manifest.lock"; 237 | outputFileListPaths = ( 238 | ); 239 | outputPaths = ( 240 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 241 | ); 242 | runOnlyForDeploymentPostprocessing = 0; 243 | shellPath = /bin/sh; 244 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 245 | showEnvVarsInLog = 0; 246 | }; 247 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 248 | isa = PBXShellScriptBuildPhase; 249 | buildActionMask = 2147483647; 250 | files = ( 251 | ); 252 | inputPaths = ( 253 | ); 254 | name = "Thin Binary"; 255 | outputPaths = ( 256 | ); 257 | runOnlyForDeploymentPostprocessing = 0; 258 | shellPath = /bin/sh; 259 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 260 | }; 261 | 9740EEB61CF901F6004384FC /* Run Script */ = { 262 | isa = PBXShellScriptBuildPhase; 263 | buildActionMask = 2147483647; 264 | files = ( 265 | ); 266 | inputPaths = ( 267 | ); 268 | name = "Run Script"; 269 | outputPaths = ( 270 | ); 271 | runOnlyForDeploymentPostprocessing = 0; 272 | shellPath = /bin/sh; 273 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 274 | }; 275 | BF494019249038ED8284C494 /* [CP] Embed Pods Frameworks */ = { 276 | isa = PBXShellScriptBuildPhase; 277 | buildActionMask = 2147483647; 278 | files = ( 279 | ); 280 | inputFileListPaths = ( 281 | ); 282 | inputPaths = ( 283 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", 284 | "${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework", 285 | ); 286 | name = "[CP] Embed Pods Frameworks"; 287 | outputFileListPaths = ( 288 | ); 289 | outputPaths = ( 290 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", 291 | ); 292 | runOnlyForDeploymentPostprocessing = 0; 293 | shellPath = /bin/sh; 294 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 295 | showEnvVarsInLog = 0; 296 | }; 297 | /* End PBXShellScriptBuildPhase section */ 298 | 299 | /* Begin PBXSourcesBuildPhase section */ 300 | 97C146EA1CF9000F007C117D /* Sources */ = { 301 | isa = PBXSourcesBuildPhase; 302 | buildActionMask = 2147483647; 303 | files = ( 304 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 305 | 97C146F31CF9000F007C117D /* main.m in Sources */, 306 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 307 | ); 308 | runOnlyForDeploymentPostprocessing = 0; 309 | }; 310 | /* End PBXSourcesBuildPhase section */ 311 | 312 | /* Begin PBXVariantGroup section */ 313 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 314 | isa = PBXVariantGroup; 315 | children = ( 316 | 97C146FB1CF9000F007C117D /* Base */, 317 | ); 318 | name = Main.storyboard; 319 | sourceTree = ""; 320 | }; 321 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 322 | isa = PBXVariantGroup; 323 | children = ( 324 | 97C147001CF9000F007C117D /* Base */, 325 | ); 326 | name = LaunchScreen.storyboard; 327 | sourceTree = ""; 328 | }; 329 | /* End PBXVariantGroup section */ 330 | 331 | /* Begin XCBuildConfiguration section */ 332 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 333 | isa = XCBuildConfiguration; 334 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 335 | buildSettings = { 336 | ALWAYS_SEARCH_USER_PATHS = NO; 337 | CLANG_ANALYZER_NONNULL = YES; 338 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 339 | CLANG_CXX_LIBRARY = "libc++"; 340 | CLANG_ENABLE_MODULES = YES; 341 | CLANG_ENABLE_OBJC_ARC = YES; 342 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 343 | CLANG_WARN_BOOL_CONVERSION = YES; 344 | CLANG_WARN_COMMA = YES; 345 | CLANG_WARN_CONSTANT_CONVERSION = YES; 346 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 347 | CLANG_WARN_EMPTY_BODY = YES; 348 | CLANG_WARN_ENUM_CONVERSION = YES; 349 | CLANG_WARN_INFINITE_RECURSION = YES; 350 | CLANG_WARN_INT_CONVERSION = YES; 351 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 352 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 353 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 354 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 355 | CLANG_WARN_STRICT_PROTOTYPES = YES; 356 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 357 | CLANG_WARN_UNREACHABLE_CODE = YES; 358 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 359 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 360 | COPY_PHASE_STRIP = NO; 361 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 362 | ENABLE_NS_ASSERTIONS = NO; 363 | ENABLE_STRICT_OBJC_MSGSEND = YES; 364 | GCC_C_LANGUAGE_STANDARD = gnu99; 365 | GCC_NO_COMMON_BLOCKS = YES; 366 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 367 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 368 | GCC_WARN_UNDECLARED_SELECTOR = YES; 369 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 370 | GCC_WARN_UNUSED_FUNCTION = YES; 371 | GCC_WARN_UNUSED_VARIABLE = YES; 372 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 373 | MTL_ENABLE_DEBUG_INFO = NO; 374 | SDKROOT = iphoneos; 375 | TARGETED_DEVICE_FAMILY = "1,2"; 376 | VALIDATE_PRODUCT = YES; 377 | }; 378 | name = Profile; 379 | }; 380 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 381 | isa = XCBuildConfiguration; 382 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 383 | buildSettings = { 384 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 385 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 386 | DEVELOPMENT_TEAM = S8QB4VV633; 387 | ENABLE_BITCODE = NO; 388 | FRAMEWORK_SEARCH_PATHS = ( 389 | "$(inherited)", 390 | "$(PROJECT_DIR)/Flutter", 391 | ); 392 | INFOPLIST_FILE = Runner/Info.plist; 393 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 394 | LIBRARY_SEARCH_PATHS = ( 395 | "$(inherited)", 396 | "$(PROJECT_DIR)/Flutter", 397 | ); 398 | PRODUCT_BUNDLE_IDENTIFIER = com.example.reduxExercise; 399 | PRODUCT_NAME = "$(TARGET_NAME)"; 400 | VERSIONING_SYSTEM = "apple-generic"; 401 | }; 402 | name = Profile; 403 | }; 404 | 97C147031CF9000F007C117D /* Debug */ = { 405 | isa = XCBuildConfiguration; 406 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 407 | buildSettings = { 408 | ALWAYS_SEARCH_USER_PATHS = NO; 409 | CLANG_ANALYZER_NONNULL = YES; 410 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 411 | CLANG_CXX_LIBRARY = "libc++"; 412 | CLANG_ENABLE_MODULES = YES; 413 | CLANG_ENABLE_OBJC_ARC = YES; 414 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 415 | CLANG_WARN_BOOL_CONVERSION = YES; 416 | CLANG_WARN_COMMA = YES; 417 | CLANG_WARN_CONSTANT_CONVERSION = YES; 418 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 419 | CLANG_WARN_EMPTY_BODY = YES; 420 | CLANG_WARN_ENUM_CONVERSION = YES; 421 | CLANG_WARN_INFINITE_RECURSION = YES; 422 | CLANG_WARN_INT_CONVERSION = YES; 423 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 424 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 425 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 426 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 427 | CLANG_WARN_STRICT_PROTOTYPES = YES; 428 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 429 | CLANG_WARN_UNREACHABLE_CODE = YES; 430 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 431 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 432 | COPY_PHASE_STRIP = NO; 433 | DEBUG_INFORMATION_FORMAT = dwarf; 434 | ENABLE_STRICT_OBJC_MSGSEND = YES; 435 | ENABLE_TESTABILITY = YES; 436 | GCC_C_LANGUAGE_STANDARD = gnu99; 437 | GCC_DYNAMIC_NO_PIC = NO; 438 | GCC_NO_COMMON_BLOCKS = YES; 439 | GCC_OPTIMIZATION_LEVEL = 0; 440 | GCC_PREPROCESSOR_DEFINITIONS = ( 441 | "DEBUG=1", 442 | "$(inherited)", 443 | ); 444 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 445 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 446 | GCC_WARN_UNDECLARED_SELECTOR = YES; 447 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 448 | GCC_WARN_UNUSED_FUNCTION = YES; 449 | GCC_WARN_UNUSED_VARIABLE = YES; 450 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 451 | MTL_ENABLE_DEBUG_INFO = YES; 452 | ONLY_ACTIVE_ARCH = YES; 453 | SDKROOT = iphoneos; 454 | TARGETED_DEVICE_FAMILY = "1,2"; 455 | }; 456 | name = Debug; 457 | }; 458 | 97C147041CF9000F007C117D /* Release */ = { 459 | isa = XCBuildConfiguration; 460 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 461 | buildSettings = { 462 | ALWAYS_SEARCH_USER_PATHS = NO; 463 | CLANG_ANALYZER_NONNULL = YES; 464 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 465 | CLANG_CXX_LIBRARY = "libc++"; 466 | CLANG_ENABLE_MODULES = YES; 467 | CLANG_ENABLE_OBJC_ARC = YES; 468 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 469 | CLANG_WARN_BOOL_CONVERSION = YES; 470 | CLANG_WARN_COMMA = YES; 471 | CLANG_WARN_CONSTANT_CONVERSION = YES; 472 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 473 | CLANG_WARN_EMPTY_BODY = YES; 474 | CLANG_WARN_ENUM_CONVERSION = YES; 475 | CLANG_WARN_INFINITE_RECURSION = YES; 476 | CLANG_WARN_INT_CONVERSION = YES; 477 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 478 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 479 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 480 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 481 | CLANG_WARN_STRICT_PROTOTYPES = YES; 482 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 483 | CLANG_WARN_UNREACHABLE_CODE = YES; 484 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 485 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 486 | COPY_PHASE_STRIP = NO; 487 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 488 | ENABLE_NS_ASSERTIONS = NO; 489 | ENABLE_STRICT_OBJC_MSGSEND = YES; 490 | GCC_C_LANGUAGE_STANDARD = gnu99; 491 | GCC_NO_COMMON_BLOCKS = YES; 492 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 493 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 494 | GCC_WARN_UNDECLARED_SELECTOR = YES; 495 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 496 | GCC_WARN_UNUSED_FUNCTION = YES; 497 | GCC_WARN_UNUSED_VARIABLE = YES; 498 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 499 | MTL_ENABLE_DEBUG_INFO = NO; 500 | SDKROOT = iphoneos; 501 | TARGETED_DEVICE_FAMILY = "1,2"; 502 | VALIDATE_PRODUCT = YES; 503 | }; 504 | name = Release; 505 | }; 506 | 97C147061CF9000F007C117D /* Debug */ = { 507 | isa = XCBuildConfiguration; 508 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 509 | buildSettings = { 510 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 511 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 512 | ENABLE_BITCODE = NO; 513 | FRAMEWORK_SEARCH_PATHS = ( 514 | "$(inherited)", 515 | "$(PROJECT_DIR)/Flutter", 516 | ); 517 | INFOPLIST_FILE = Runner/Info.plist; 518 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 519 | LIBRARY_SEARCH_PATHS = ( 520 | "$(inherited)", 521 | "$(PROJECT_DIR)/Flutter", 522 | ); 523 | PRODUCT_BUNDLE_IDENTIFIER = com.example.reduxExercise; 524 | PRODUCT_NAME = "$(TARGET_NAME)"; 525 | VERSIONING_SYSTEM = "apple-generic"; 526 | }; 527 | name = Debug; 528 | }; 529 | 97C147071CF9000F007C117D /* Release */ = { 530 | isa = XCBuildConfiguration; 531 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 532 | buildSettings = { 533 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 534 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 535 | ENABLE_BITCODE = NO; 536 | FRAMEWORK_SEARCH_PATHS = ( 537 | "$(inherited)", 538 | "$(PROJECT_DIR)/Flutter", 539 | ); 540 | INFOPLIST_FILE = Runner/Info.plist; 541 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 542 | LIBRARY_SEARCH_PATHS = ( 543 | "$(inherited)", 544 | "$(PROJECT_DIR)/Flutter", 545 | ); 546 | PRODUCT_BUNDLE_IDENTIFIER = com.example.reduxExercise; 547 | PRODUCT_NAME = "$(TARGET_NAME)"; 548 | VERSIONING_SYSTEM = "apple-generic"; 549 | }; 550 | name = Release; 551 | }; 552 | /* End XCBuildConfiguration section */ 553 | 554 | /* Begin XCConfigurationList section */ 555 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 556 | isa = XCConfigurationList; 557 | buildConfigurations = ( 558 | 97C147031CF9000F007C117D /* Debug */, 559 | 97C147041CF9000F007C117D /* Release */, 560 | 249021D3217E4FDB00AE95B9 /* Profile */, 561 | ); 562 | defaultConfigurationIsVisible = 0; 563 | defaultConfigurationName = Release; 564 | }; 565 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 566 | isa = XCConfigurationList; 567 | buildConfigurations = ( 568 | 97C147061CF9000F007C117D /* Debug */, 569 | 97C147071CF9000F007C117D /* Release */, 570 | 249021D4217E4FDB00AE95B9 /* Profile */, 571 | ); 572 | defaultConfigurationIsVisible = 0; 573 | defaultConfigurationName = Release; 574 | }; 575 | /* End XCConfigurationList section */ 576 | }; 577 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 578 | } 579 | --------------------------------------------------------------------------------