├── .gitignore
├── .metadata
├── README.md
├── analysis_options.yaml
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── drink_menu
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable-hdpi
│ │ │ ├── android12splash.png
│ │ │ └── splash.png
│ │ │ ├── drawable-mdpi
│ │ │ ├── android12splash.png
│ │ │ └── splash.png
│ │ │ ├── drawable-night-hdpi
│ │ │ └── android12splash.png
│ │ │ ├── drawable-night-mdpi
│ │ │ └── android12splash.png
│ │ │ ├── drawable-night-xhdpi
│ │ │ └── android12splash.png
│ │ │ ├── drawable-night-xxhdpi
│ │ │ └── android12splash.png
│ │ │ ├── drawable-night-xxxhdpi
│ │ │ └── android12splash.png
│ │ │ ├── drawable-v21
│ │ │ ├── background.png
│ │ │ └── launch_background.xml
│ │ │ ├── drawable-xhdpi
│ │ │ ├── android12splash.png
│ │ │ └── splash.png
│ │ │ ├── drawable-xxhdpi
│ │ │ ├── android12splash.png
│ │ │ └── splash.png
│ │ │ ├── drawable-xxxhdpi
│ │ │ ├── android12splash.png
│ │ │ └── splash.png
│ │ │ ├── drawable
│ │ │ ├── background.png
│ │ │ └── launch_background.xml
│ │ │ ├── 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-night-v31
│ │ │ └── styles.xml
│ │ │ ├── values-night
│ │ │ └── styles.xml
│ │ │ ├── values-v31
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── apk-build
└── app-release.apk
├── assets
└── logo.png
├── example
└── first_Flutter_app_gif_AdobeExpress.gif
├── lib
├── main.dart
└── views
│ ├── home.dart
│ └── widgets
│ └── drink_card.dart
├── pubspec.lock
├── pubspec.yaml
└── test
└── widget_test.dart
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .packages
31 | .pub-cache/
32 | .pub/
33 | /build/
34 |
35 | # Symbolication related
36 | app.*.symbols
37 |
38 | # Obfuscation related
39 | app.*.map.json
40 |
41 | # Android Studio will place build artifacts here
42 | /android/app/debug
43 | /android/app/profile
44 | /android/app/release
45 |
--------------------------------------------------------------------------------
/.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.
5 |
6 | version:
7 | revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
8 | channel: stable
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
17 | base_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
18 | - platform: android
19 | create_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
20 | base_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
21 | - platform: ios
22 | create_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
23 | base_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
24 | - platform: linux
25 | create_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
26 | base_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
27 | - platform: macos
28 | create_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
29 | base_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
30 | - platform: web
31 | create_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
32 | base_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
33 | - platform: windows
34 | create_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
35 | base_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
36 |
37 | # User provided section
38 |
39 | # List of Local paths (relative to this file) that should be
40 | # ignored by the migrate tool.
41 | #
42 | # Files that are not part of the templates will be ignored by default.
43 | unmanaged_files:
44 | - 'lib/main.dart'
45 | - 'ios/Runner.xcodeproj/project.pbxproj'
46 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
Drink Menu Flutter App
3 |
4 | Is my first flutter app, and it uses drink-menu-backend as backend API.
5 |
6 |
7 | |  |
8 | |---
9 | | **Example app** |
10 |
11 | # To run the app
12 |
13 | ### You can launch flutter app in two ways by:
14 | 1- By downloading the project and running it locally
15 |
16 | ```bash
17 | flutter run
18 | ```
19 |
20 | 2- Use the apk in the apk-build file in project file.
21 |
22 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | linter:
13 | # The lint rules applied to this project can be customized in the
14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15 | # included above or to enable additional rules. A list of all available lints
16 | # and their documentation is published at
17 | # https://dart-lang.github.io/linter/lints/index.html.
18 | #
19 | # Instead of disabling a lint rule for the entire project in the
20 | # section below, it can also be suppressed for a single line of code
21 | # or a specific dart file by using the `// ignore: name_of_lint` and
22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
23 | # producing the lint.
24 | rules:
25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27 |
28 | # Additional information about this file can be found at
29 | # https://dart.dev/guides/language/analysis-options
30 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/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 plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion flutter.compileSdkVersion
30 | ndkVersion flutter.ndkVersion
31 |
32 | compileOptions {
33 | sourceCompatibility JavaVersion.VERSION_1_8
34 | targetCompatibility JavaVersion.VERSION_1_8
35 | }
36 |
37 | kotlinOptions {
38 | jvmTarget = '1.8'
39 | }
40 |
41 | sourceSets {
42 | main.java.srcDirs += 'src/main/kotlin'
43 | }
44 |
45 | defaultConfig {
46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
47 | applicationId "com.example.drink_menu"
48 | // You can update the following values to match your application needs.
49 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
50 | minSdkVersion flutter.minSdkVersion
51 | targetSdkVersion flutter.targetSdkVersion
52 | versionCode flutterVersionCode.toInteger()
53 | versionName flutterVersionName
54 | }
55 |
56 | buildTypes {
57 | release {
58 | // TODO: Add your own signing config for the release build.
59 | // Signing with the debug keys for now, so `flutter run --release` works.
60 | signingConfig signingConfigs.debug
61 | }
62 | }
63 | }
64 |
65 | flutter {
66 | source '../..'
67 | }
68 |
69 | dependencies {
70 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
71 | }
72 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
15 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
30 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/drink_menu/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.drink_menu
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-hdpi/android12splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aziz-AXG/drink-menu-flutter-app/8d864e4994084abf97364d57b8fdf406a69be2ef/android/app/src/main/res/drawable-hdpi/android12splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-hdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aziz-AXG/drink-menu-flutter-app/8d864e4994084abf97364d57b8fdf406a69be2ef/android/app/src/main/res/drawable-hdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/android12splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aziz-AXG/drink-menu-flutter-app/8d864e4994084abf97364d57b8fdf406a69be2ef/android/app/src/main/res/drawable-mdpi/android12splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aziz-AXG/drink-menu-flutter-app/8d864e4994084abf97364d57b8fdf406a69be2ef/android/app/src/main/res/drawable-mdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-night-hdpi/android12splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aziz-AXG/drink-menu-flutter-app/8d864e4994084abf97364d57b8fdf406a69be2ef/android/app/src/main/res/drawable-night-hdpi/android12splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-night-mdpi/android12splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aziz-AXG/drink-menu-flutter-app/8d864e4994084abf97364d57b8fdf406a69be2ef/android/app/src/main/res/drawable-night-mdpi/android12splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-night-xhdpi/android12splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aziz-AXG/drink-menu-flutter-app/8d864e4994084abf97364d57b8fdf406a69be2ef/android/app/src/main/res/drawable-night-xhdpi/android12splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-night-xxhdpi/android12splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aziz-AXG/drink-menu-flutter-app/8d864e4994084abf97364d57b8fdf406a69be2ef/android/app/src/main/res/drawable-night-xxhdpi/android12splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-night-xxxhdpi/android12splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aziz-AXG/drink-menu-flutter-app/8d864e4994084abf97364d57b8fdf406a69be2ef/android/app/src/main/res/drawable-night-xxxhdpi/android12splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aziz-AXG/drink-menu-flutter-app/8d864e4994084abf97364d57b8fdf406a69be2ef/android/app/src/main/res/drawable-v21/background.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 | -
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xhdpi/android12splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aziz-AXG/drink-menu-flutter-app/8d864e4994084abf97364d57b8fdf406a69be2ef/android/app/src/main/res/drawable-xhdpi/android12splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aziz-AXG/drink-menu-flutter-app/8d864e4994084abf97364d57b8fdf406a69be2ef/android/app/src/main/res/drawable-xhdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxhdpi/android12splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aziz-AXG/drink-menu-flutter-app/8d864e4994084abf97364d57b8fdf406a69be2ef/android/app/src/main/res/drawable-xxhdpi/android12splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aziz-AXG/drink-menu-flutter-app/8d864e4994084abf97364d57b8fdf406a69be2ef/android/app/src/main/res/drawable-xxhdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxxhdpi/android12splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aziz-AXG/drink-menu-flutter-app/8d864e4994084abf97364d57b8fdf406a69be2ef/android/app/src/main/res/drawable-xxxhdpi/android12splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aziz-AXG/drink-menu-flutter-app/8d864e4994084abf97364d57b8fdf406a69be2ef/android/app/src/main/res/drawable-xxxhdpi/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aziz-AXG/drink-menu-flutter-app/8d864e4994084abf97364d57b8fdf406a69be2ef/android/app/src/main/res/drawable/background.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 | -
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aziz-AXG/drink-menu-flutter-app/8d864e4994084abf97364d57b8fdf406a69be2ef/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aziz-AXG/drink-menu-flutter-app/8d864e4994084abf97364d57b8fdf406a69be2ef/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aziz-AXG/drink-menu-flutter-app/8d864e4994084abf97364d57b8fdf406a69be2ef/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aziz-AXG/drink-menu-flutter-app/8d864e4994084abf97364d57b8fdf406a69be2ef/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aziz-AXG/drink-menu-flutter-app/8d864e4994084abf97364d57b8fdf406a69be2ef/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night-v31/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
18 |
21 |
22 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values-v31/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
18 |
21 |
22 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
18 |
21 |
22 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.6.10'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:7.1.2'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | mavenCentral()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
6 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/apk-build/app-release.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aziz-AXG/drink-menu-flutter-app/8d864e4994084abf97364d57b8fdf406a69be2ef/apk-build/app-release.apk
--------------------------------------------------------------------------------
/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aziz-AXG/drink-menu-flutter-app/8d864e4994084abf97364d57b8fdf406a69be2ef/assets/logo.png
--------------------------------------------------------------------------------
/example/first_Flutter_app_gif_AdobeExpress.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aziz-AXG/drink-menu-flutter-app/8d864e4994084abf97364d57b8fdf406a69be2ef/example/first_Flutter_app_gif_AdobeExpress.gif
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:drink_menu/views/home.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:google_fonts/google_fonts.dart';
4 |
5 | void main() {
6 | runApp(MyApp());
7 | }
8 |
9 | class MyApp extends StatelessWidget {
10 | @override
11 | Widget build(BuildContext context) {
12 | return MaterialApp(
13 | debugShowCheckedModeBanner: false,
14 | title: 'Drink menu',
15 | theme: ThemeData(
16 | primarySwatch: Colors.red,
17 | primaryColor: Colors.white,
18 | textTheme:
19 | TextTheme(bodyText2: GoogleFonts.roboto(color: Colors.white))),
20 | home: HomePage(),
21 | );
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/views/home.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 | import 'package:drink_menu/views/widgets/drink_card.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:google_fonts/google_fonts.dart';
5 | import 'package:http/http.dart' as http;
6 |
7 | class HomePage extends StatefulWidget {
8 | const HomePage({super.key});
9 |
10 | @override
11 | State createState() => _HomePageState();
12 | }
13 |
14 | class _HomePageState extends State {
15 | List drinkList = [];
16 |
17 | var isLoading = true;
18 |
19 | Future getAllCategory() async {
20 | var baseUrl = "https://drink-menu.adaptable.app/api/drink";
21 |
22 | http.Response response = await http.get(Uri.parse(baseUrl));
23 |
24 | if (response.statusCode == 200) {
25 | var jsonData = jsonDecode(response.body);
26 | setState(() {
27 | drinkList = jsonData;
28 | isLoading = false;
29 | });
30 | }
31 | }
32 |
33 | @override
34 | void initState() {
35 | super.initState();
36 | getAllCategory();
37 | }
38 |
39 | @override
40 | Widget build(BuildContext context) {
41 | return Scaffold(
42 | appBar: AppBar(
43 | title: Row(
44 | mainAxisAlignment: MainAxisAlignment.center,
45 | children: [
46 | Text(
47 | 'CAFE BOX',
48 | style: GoogleFonts.seymourOne(),
49 | ),
50 | ],
51 | ),
52 | ),
53 | body: isLoading == true
54 | ? const Center(child: CircularProgressIndicator())
55 | : ListView.builder(
56 | itemCount: drinkList.length,
57 | scrollDirection: Axis.vertical,
58 | itemBuilder: (context, i) {
59 | return Row(
60 | mainAxisAlignment: MainAxisAlignment.center,
61 | crossAxisAlignment: CrossAxisAlignment.start,
62 | children: [
63 | DrinkCard2(
64 | price: drinkList[i]['price'],
65 | drinkName: drinkList[i]['drinkName'],
66 | imgUrl: drinkList[i]['imageName']),
67 | ],
68 | );
69 | },
70 | ),
71 | );
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/lib/views/widgets/drink_card.dart:
--------------------------------------------------------------------------------
1 | import 'package:cached_network_image/cached_network_image.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class DrinkCard2 extends StatelessWidget {
5 | final int price;
6 | final String drinkName;
7 | final String imgUrl;
8 | const DrinkCard2({
9 | super.key,
10 | required this.price,
11 | required this.drinkName,
12 | required this.imgUrl,
13 | });
14 | @override
15 | Widget build(BuildContext context) {
16 | return Container(
17 | margin: const EdgeInsets.symmetric(horizontal: 22, vertical: 10),
18 | height: 240,
19 | width: 260,
20 | decoration: BoxDecoration(
21 | color: const Color.fromARGB(255, 218, 76, 66),
22 | borderRadius: const BorderRadius.only(
23 | topLeft: Radius.circular(220),
24 | topRight: Radius.circular(25),
25 | bottomLeft: Radius.circular(25),
26 | bottomRight: Radius.circular(25),
27 | ),
28 | boxShadow: [
29 | BoxShadow(
30 | color: Colors.black.withOpacity(0.6),
31 | offset: const Offset(
32 | 0.0,
33 | 10.0,
34 | ),
35 | blurRadius: 10.0,
36 | spreadRadius: -6.0,
37 | ),
38 | ],
39 | ),
40 | child: Stack(
41 | children: [
42 | Align(
43 | alignment: Alignment.topRight,
44 | child: Container(
45 | padding: const EdgeInsets.all(5),
46 | margin: const EdgeInsets.all(10),
47 | decoration: BoxDecoration(
48 | color: Colors.black.withOpacity(0.4),
49 | borderRadius: BorderRadius.circular(15),
50 | ),
51 | child: Text('$price \$',
52 | style: const TextStyle(
53 | fontSize: 25,
54 | ))),
55 | ),
56 | Container(
57 | width: 220,
58 | height: 220,
59 | child: CachedNetworkImage(
60 | imageUrl: imgUrl,
61 | placeholder: (context, url) => const CircularProgressIndicator(
62 | color: Colors.red,
63 | ),
64 | errorWidget: (context, url, error) => const Icon(Icons.error),
65 | ),
66 | ),
67 | Align(
68 | alignment: Alignment.bottomCenter,
69 | child: Container(
70 | padding: const EdgeInsets.all(10),
71 | margin: const EdgeInsets.all(10),
72 | decoration: BoxDecoration(
73 | color: Colors.black.withOpacity(0.4),
74 | borderRadius: BorderRadius.circular(15),
75 | ),
76 | child: Container(
77 | child: (Text(
78 | drinkName,
79 | style: const TextStyle(
80 | fontSize: 26,
81 | ),
82 | textAlign: TextAlign.center,
83 | )),
84 | ),
85 | ),
86 | ),
87 | ],
88 | ),
89 | );
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | archive:
5 | dependency: transitive
6 | description:
7 | name: archive
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "3.3.5"
11 | args:
12 | dependency: transitive
13 | description:
14 | name: args
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "2.3.1"
18 | async:
19 | dependency: transitive
20 | description:
21 | name: async
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "2.9.0"
25 | boolean_selector:
26 | dependency: transitive
27 | description:
28 | name: boolean_selector
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "2.1.0"
32 | cached_network_image:
33 | dependency: "direct main"
34 | description:
35 | name: cached_network_image
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "3.2.2"
39 | cached_network_image_platform_interface:
40 | dependency: transitive
41 | description:
42 | name: cached_network_image_platform_interface
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "2.0.0"
46 | cached_network_image_web:
47 | dependency: transitive
48 | description:
49 | name: cached_network_image_web
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "1.0.2"
53 | characters:
54 | dependency: transitive
55 | description:
56 | name: characters
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "1.2.1"
60 | checked_yaml:
61 | dependency: transitive
62 | description:
63 | name: checked_yaml
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "2.0.1"
67 | cli_util:
68 | dependency: transitive
69 | description:
70 | name: cli_util
71 | url: "https://pub.dartlang.org"
72 | source: hosted
73 | version: "0.3.5"
74 | clock:
75 | dependency: transitive
76 | description:
77 | name: clock
78 | url: "https://pub.dartlang.org"
79 | source: hosted
80 | version: "1.1.1"
81 | collection:
82 | dependency: transitive
83 | description:
84 | name: collection
85 | url: "https://pub.dartlang.org"
86 | source: hosted
87 | version: "1.16.0"
88 | convert:
89 | dependency: transitive
90 | description:
91 | name: convert
92 | url: "https://pub.dartlang.org"
93 | source: hosted
94 | version: "3.1.1"
95 | crypto:
96 | dependency: transitive
97 | description:
98 | name: crypto
99 | url: "https://pub.dartlang.org"
100 | source: hosted
101 | version: "3.0.2"
102 | csslib:
103 | dependency: transitive
104 | description:
105 | name: csslib
106 | url: "https://pub.dartlang.org"
107 | source: hosted
108 | version: "0.17.2"
109 | cupertino_icons:
110 | dependency: "direct main"
111 | description:
112 | name: cupertino_icons
113 | url: "https://pub.dartlang.org"
114 | source: hosted
115 | version: "1.0.5"
116 | fake_async:
117 | dependency: transitive
118 | description:
119 | name: fake_async
120 | url: "https://pub.dartlang.org"
121 | source: hosted
122 | version: "1.3.1"
123 | ffi:
124 | dependency: transitive
125 | description:
126 | name: ffi
127 | url: "https://pub.dartlang.org"
128 | source: hosted
129 | version: "2.0.1"
130 | file:
131 | dependency: transitive
132 | description:
133 | name: file
134 | url: "https://pub.dartlang.org"
135 | source: hosted
136 | version: "6.1.4"
137 | flutter:
138 | dependency: "direct main"
139 | description: flutter
140 | source: sdk
141 | version: "0.0.0"
142 | flutter_blurhash:
143 | dependency: transitive
144 | description:
145 | name: flutter_blurhash
146 | url: "https://pub.dartlang.org"
147 | source: hosted
148 | version: "0.7.0"
149 | flutter_cache_manager:
150 | dependency: transitive
151 | description:
152 | name: flutter_cache_manager
153 | url: "https://pub.dartlang.org"
154 | source: hosted
155 | version: "3.3.0"
156 | flutter_launcher_icons:
157 | dependency: "direct dev"
158 | description:
159 | name: flutter_launcher_icons
160 | url: "https://pub.dartlang.org"
161 | source: hosted
162 | version: "0.11.0"
163 | flutter_lints:
164 | dependency: "direct dev"
165 | description:
166 | name: flutter_lints
167 | url: "https://pub.dartlang.org"
168 | source: hosted
169 | version: "2.0.1"
170 | flutter_native_splash:
171 | dependency: "direct main"
172 | description:
173 | name: flutter_native_splash
174 | url: "https://pub.dartlang.org"
175 | source: hosted
176 | version: "2.2.15"
177 | flutter_test:
178 | dependency: "direct dev"
179 | description: flutter
180 | source: sdk
181 | version: "0.0.0"
182 | flutter_web_plugins:
183 | dependency: transitive
184 | description: flutter
185 | source: sdk
186 | version: "0.0.0"
187 | google_fonts:
188 | dependency: "direct main"
189 | description:
190 | name: google_fonts
191 | url: "https://pub.dartlang.org"
192 | source: hosted
193 | version: "3.0.1"
194 | html:
195 | dependency: transitive
196 | description:
197 | name: html
198 | url: "https://pub.dartlang.org"
199 | source: hosted
200 | version: "0.15.1"
201 | http:
202 | dependency: "direct main"
203 | description:
204 | name: http
205 | url: "https://pub.dartlang.org"
206 | source: hosted
207 | version: "0.13.5"
208 | http_parser:
209 | dependency: transitive
210 | description:
211 | name: http_parser
212 | url: "https://pub.dartlang.org"
213 | source: hosted
214 | version: "4.0.2"
215 | image:
216 | dependency: transitive
217 | description:
218 | name: image
219 | url: "https://pub.dartlang.org"
220 | source: hosted
221 | version: "3.2.2"
222 | js:
223 | dependency: transitive
224 | description:
225 | name: js
226 | url: "https://pub.dartlang.org"
227 | source: hosted
228 | version: "0.6.4"
229 | json_annotation:
230 | dependency: transitive
231 | description:
232 | name: json_annotation
233 | url: "https://pub.dartlang.org"
234 | source: hosted
235 | version: "4.7.0"
236 | lints:
237 | dependency: transitive
238 | description:
239 | name: lints
240 | url: "https://pub.dartlang.org"
241 | source: hosted
242 | version: "2.0.1"
243 | matcher:
244 | dependency: transitive
245 | description:
246 | name: matcher
247 | url: "https://pub.dartlang.org"
248 | source: hosted
249 | version: "0.12.12"
250 | material_color_utilities:
251 | dependency: transitive
252 | description:
253 | name: material_color_utilities
254 | url: "https://pub.dartlang.org"
255 | source: hosted
256 | version: "0.1.5"
257 | meta:
258 | dependency: transitive
259 | description:
260 | name: meta
261 | url: "https://pub.dartlang.org"
262 | source: hosted
263 | version: "1.8.0"
264 | octo_image:
265 | dependency: transitive
266 | description:
267 | name: octo_image
268 | url: "https://pub.dartlang.org"
269 | source: hosted
270 | version: "1.0.2"
271 | path:
272 | dependency: transitive
273 | description:
274 | name: path
275 | url: "https://pub.dartlang.org"
276 | source: hosted
277 | version: "1.8.2"
278 | path_provider:
279 | dependency: transitive
280 | description:
281 | name: path_provider
282 | url: "https://pub.dartlang.org"
283 | source: hosted
284 | version: "2.0.11"
285 | path_provider_android:
286 | dependency: transitive
287 | description:
288 | name: path_provider_android
289 | url: "https://pub.dartlang.org"
290 | source: hosted
291 | version: "2.0.22"
292 | path_provider_ios:
293 | dependency: transitive
294 | description:
295 | name: path_provider_ios
296 | url: "https://pub.dartlang.org"
297 | source: hosted
298 | version: "2.0.11"
299 | path_provider_linux:
300 | dependency: transitive
301 | description:
302 | name: path_provider_linux
303 | url: "https://pub.dartlang.org"
304 | source: hosted
305 | version: "2.1.7"
306 | path_provider_macos:
307 | dependency: transitive
308 | description:
309 | name: path_provider_macos
310 | url: "https://pub.dartlang.org"
311 | source: hosted
312 | version: "2.0.6"
313 | path_provider_platform_interface:
314 | dependency: transitive
315 | description:
316 | name: path_provider_platform_interface
317 | url: "https://pub.dartlang.org"
318 | source: hosted
319 | version: "2.0.5"
320 | path_provider_windows:
321 | dependency: transitive
322 | description:
323 | name: path_provider_windows
324 | url: "https://pub.dartlang.org"
325 | source: hosted
326 | version: "2.1.3"
327 | pedantic:
328 | dependency: transitive
329 | description:
330 | name: pedantic
331 | url: "https://pub.dartlang.org"
332 | source: hosted
333 | version: "1.11.1"
334 | petitparser:
335 | dependency: transitive
336 | description:
337 | name: petitparser
338 | url: "https://pub.dartlang.org"
339 | source: hosted
340 | version: "5.1.0"
341 | platform:
342 | dependency: transitive
343 | description:
344 | name: platform
345 | url: "https://pub.dartlang.org"
346 | source: hosted
347 | version: "3.1.0"
348 | plugin_platform_interface:
349 | dependency: transitive
350 | description:
351 | name: plugin_platform_interface
352 | url: "https://pub.dartlang.org"
353 | source: hosted
354 | version: "2.1.3"
355 | pointycastle:
356 | dependency: transitive
357 | description:
358 | name: pointycastle
359 | url: "https://pub.dartlang.org"
360 | source: hosted
361 | version: "3.6.2"
362 | process:
363 | dependency: transitive
364 | description:
365 | name: process
366 | url: "https://pub.dartlang.org"
367 | source: hosted
368 | version: "4.2.4"
369 | rxdart:
370 | dependency: transitive
371 | description:
372 | name: rxdart
373 | url: "https://pub.dartlang.org"
374 | source: hosted
375 | version: "0.27.7"
376 | sky_engine:
377 | dependency: transitive
378 | description: flutter
379 | source: sdk
380 | version: "0.0.99"
381 | source_span:
382 | dependency: transitive
383 | description:
384 | name: source_span
385 | url: "https://pub.dartlang.org"
386 | source: hosted
387 | version: "1.9.0"
388 | sqflite:
389 | dependency: transitive
390 | description:
391 | name: sqflite
392 | url: "https://pub.dartlang.org"
393 | source: hosted
394 | version: "2.2.0+3"
395 | sqflite_common:
396 | dependency: transitive
397 | description:
398 | name: sqflite_common
399 | url: "https://pub.dartlang.org"
400 | source: hosted
401 | version: "2.4.0+2"
402 | stack_trace:
403 | dependency: transitive
404 | description:
405 | name: stack_trace
406 | url: "https://pub.dartlang.org"
407 | source: hosted
408 | version: "1.10.0"
409 | stream_channel:
410 | dependency: transitive
411 | description:
412 | name: stream_channel
413 | url: "https://pub.dartlang.org"
414 | source: hosted
415 | version: "2.1.0"
416 | string_scanner:
417 | dependency: transitive
418 | description:
419 | name: string_scanner
420 | url: "https://pub.dartlang.org"
421 | source: hosted
422 | version: "1.1.1"
423 | synchronized:
424 | dependency: transitive
425 | description:
426 | name: synchronized
427 | url: "https://pub.dartlang.org"
428 | source: hosted
429 | version: "3.0.0+3"
430 | term_glyph:
431 | dependency: transitive
432 | description:
433 | name: term_glyph
434 | url: "https://pub.dartlang.org"
435 | source: hosted
436 | version: "1.2.1"
437 | test_api:
438 | dependency: transitive
439 | description:
440 | name: test_api
441 | url: "https://pub.dartlang.org"
442 | source: hosted
443 | version: "0.4.12"
444 | typed_data:
445 | dependency: transitive
446 | description:
447 | name: typed_data
448 | url: "https://pub.dartlang.org"
449 | source: hosted
450 | version: "1.3.1"
451 | universal_io:
452 | dependency: transitive
453 | description:
454 | name: universal_io
455 | url: "https://pub.dartlang.org"
456 | source: hosted
457 | version: "2.0.4"
458 | uuid:
459 | dependency: transitive
460 | description:
461 | name: uuid
462 | url: "https://pub.dartlang.org"
463 | source: hosted
464 | version: "3.0.7"
465 | vector_math:
466 | dependency: transitive
467 | description:
468 | name: vector_math
469 | url: "https://pub.dartlang.org"
470 | source: hosted
471 | version: "2.1.2"
472 | win32:
473 | dependency: transitive
474 | description:
475 | name: win32
476 | url: "https://pub.dartlang.org"
477 | source: hosted
478 | version: "3.1.1"
479 | xdg_directories:
480 | dependency: transitive
481 | description:
482 | name: xdg_directories
483 | url: "https://pub.dartlang.org"
484 | source: hosted
485 | version: "0.2.0+2"
486 | xml:
487 | dependency: transitive
488 | description:
489 | name: xml
490 | url: "https://pub.dartlang.org"
491 | source: hosted
492 | version: "6.1.0"
493 | yaml:
494 | dependency: transitive
495 | description:
496 | name: yaml
497 | url: "https://pub.dartlang.org"
498 | source: hosted
499 | version: "3.1.1"
500 | sdks:
501 | dart: ">=2.18.4 <3.0.0"
502 | flutter: ">=3.3.0"
503 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: drink_menu
2 | description: A new Flutter project.
3 |
4 | # The following line prevents the package from being accidentally published to
5 | # pub.dev using `flutter pub publish`. This is preferred for private packages.
6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev
7 |
8 | # The following defines the version and build number for your application.
9 | # A version number is three numbers separated by dots, like 1.2.43
10 | # followed by an optional build number separated by a +.
11 | # Both the version and the builder number may be overridden in flutter
12 | # build by specifying --build-name and --build-number, respectively.
13 | # In Android, build-name is used as versionName while build-number used as versionCode.
14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
16 | # Read more about iOS versioning at
17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
18 | # In Windows, build-name is used as the major, minor, and patch parts
19 | # of the product and file versions while build-number is used as the build suffix.
20 | version: 1.0.0+1
21 |
22 | environment:
23 | sdk: '>=2.18.4 <3.0.0'
24 |
25 | # Dependencies specify other packages that your package needs in order to work.
26 | # To automatically upgrade your package dependencies to the latest versions
27 | # consider running `flutter pub upgrade --major-versions`. Alternatively,
28 | # dependencies can be manually updated by changing the version numbers below to
29 | # the latest version available on pub.dev. To see which dependencies have newer
30 | # versions available, run `flutter pub outdated`.
31 | dependencies:
32 | flutter:
33 | sdk: flutter
34 | # The following adds the Cupertino Icons font to your application.
35 | # Use with the CupertinoIcons class for iOS style icons.
36 | cupertino_icons: ^1.0.2
37 | http: ^0.13.5
38 | google_fonts: ^3.0.1
39 | cached_network_image: ^3.2.2
40 | flutter_native_splash: ^2.2.15
41 |
42 | flutter_native_splash:
43 | color: "#ffffff"
44 | image: assets/logo.png
45 | android: true
46 | ios: true
47 | android_12:
48 | image: assets/logo.png
49 | icon_background_color: "#ffffff"
50 |
51 |
52 |
53 |
54 | dev_dependencies:
55 | flutter_test:
56 | sdk: flutter
57 |
58 | flutter_lints: ^2.0.0
59 | flutter_launcher_icons: ^0.11.0
60 |
61 | flutter_icons:
62 | android: true
63 | ios: true
64 | image_path: "assets/logo.png"
65 |
66 | # For information on the generic Dart part of this file, see the
67 | # following page: https://dart.dev/tools/pub/pubspec
68 |
69 | # The following section is specific to Flutter packages.
70 | flutter:
71 |
72 | # The following line ensures that the Material Icons font is
73 | # included with your application, so that you can use the icons in
74 | # the material Icons class.
75 | uses-material-design: true
76 |
77 | # To add assets to your application, add an assets section, like this:
78 | assets:
79 | - assets/logo.png
80 | # - images/a_dot_ham.jpeg
81 |
82 | # An image asset can refer to one or more resolution-specific "variants", see
83 | # https://flutter.dev/assets-and-images/#resolution-aware
84 |
85 | # For details regarding adding assets from package dependencies, see
86 | # https://flutter.dev/assets-and-images/#from-packages
87 |
88 | # To add custom fonts to your application, add a fonts section here,
89 | # in this "flutter" section. Each entry in this list should have a
90 | # "family" key with the font family name, and a "fonts" key with a
91 | # list giving the asset and other descriptors for the font. For
92 | # example:
93 | # fonts:
94 | # - family: Schyler
95 | # fonts:
96 | # - asset: fonts/Schyler-Regular.ttf
97 | # - asset: fonts/Schyler-Italic.ttf
98 | # style: italic
99 | # - family: Trajan Pro
100 | # fonts:
101 | # - asset: fonts/TrajanPro.ttf
102 | # - asset: fonts/TrajanPro_Bold.ttf
103 | # weight: 700
104 | #
105 | # For details regarding fonts from package dependencies,
106 | # see https://flutter.dev/custom-fonts/#from-packages
107 |
--------------------------------------------------------------------------------
/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 in the flutter_test package. 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:drink_menu/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 |
--------------------------------------------------------------------------------