Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create a tutorial for building this app, it's not as easy for everyone #7

Closed
AriaShishegaran opened this issue Jul 1, 2020 · 10 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@AriaShishegaran
Copy link

hi there, thanks for sharing this knowledge and techniques.
i wanted to suggest that you add a tutorial regarding the exact steps to take for making a successful build.
there are many problems associated with the current version:

  1. updating packages in pubspec.yaml results in breaking changes that prevent the app from compiling. so I think either it needs to be updated or a warning needs to be shown to users that they are not allowed to update anything.

  2. for iOS devices the automatic settings result in a target version in which the app does not support but the code doesn't mention a target version either, so it creates have huge confusion.

  3. as you know the app would not build with the conventional build system of VSCode or IntelliJ and needs some flutter action in the terminal, i think better clarification regarding that would help more adoption of this great code as a hands-on tutorial.

@KhoaSuperman
Copy link
Owner

Hi. Thanks for your question. Many people dm me about that too. Here are short instructions for success build:
- Flutter doctor
[√] Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version 10.0.18363.900], locale en-US)
• Flutter version 1.12.13+hotfix.5 at C:\src\flutter
• Framework revision 27321ebbad (7 months ago), 2019-12-10 18:15:01 -0800
• Engine revision 2994f7e1e6
• Dart version 2.7.0

[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at C:\Users\ASUS\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 28.0.3
• Java binary at: C:\Program Files\Android\AS33\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
• All Android licenses accepted.

[√] Android Studio (version 3.1)
• Android Studio at C:\Program Files\Android\AS31
• Flutter plugin version 29.0.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)

[√] Android Studio (version 3.6)
• Android Studio at C:\Program Files\Android\AS33
• Flutter plugin version 47.1.1
• Dart plugin version 192.8052
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[!] IntelliJ IDEA Community Edition (version 2018.3)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.3.4
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
• For information about installing plugins, see
https://flutter.dev/intellij-setup/#installing-the-plugins

[!] VS Code (version 1.46.1)
• VS Code at C:\Users\ASUS\AppData\Local\Programs\Microsoft VS Code
X Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[√] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.1.0 (API 27) (emulator)

! Doctor found issues in 2 categories.

- Run command for code generation:
flutter pub run build_runner build --delete-conflicting-outputs (make sure you run flutter pub get first)

Hope it helps

@KhoaSuperman KhoaSuperman added documentation Improvements or additions to documentation good first issue Good for newcomers labels Jul 5, 2020
@KhoaSuperman KhoaSuperman pinned this issue Jul 5, 2020
@hitman3r44
Copy link

Hi thanks for this project, I am trying to learn flutter with firebase. I got some problems compiling the code, according to this instruction I did as it wrote. I am shearing the output what i got:

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 1.22.0-10.0.pre.379, on Mac OS X 10.15.6 19G2021 x86_64, locale en-CA)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
[✓] Android Studio (version 4.0)
[!] IntelliJ IDEA Ultimate Edition (version 2020.2.2)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.47.2)

command: flutter pub run build_runner build --delete-conflicting-outputs
Output:

Failed to precompile build_runner:build_runner:
../../../.pub-cache/hosted/pub.dartlang.org/dart_style-1.3.3/lib/src/dart_formatter.dart:105:30: Error: Too many positional arguments: 0 allowed, but 1 found.
Try removing the extra positional arguments.
scanner.configureFeatures(featureSet);
^
../../../.pub-cache/hosted/pub.dartlang.org/build_resolvers-1.3.3/lib/src/resolver.dart:301:10: Error: Method not found: 'SummaryBuilder'.
return SummaryBuilder(sdkSources, sdk.context).build();
^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dartlang.org/build_resolvers-1.3.3/lib/src/resolver.dart:290:7: Error: The setter 'useSummary' isn't defined for the class 'FolderBasedDartSdk'.

  • 'FolderBasedDartSdk' is from 'package:analyzer/src/dart/sdk/sdk.dart' ('../../../.pub-cache/hosted/pub.dartlang.org/analyzer-0.39.17/lib/src/dart/sdk/sdk.dart').
    Try correcting the name to the name of an existing setter, or defining a setter or field named 'useSummary'.
    ..useSummary = false
    ^^^^^^^^^^
    pub finished with exit code 1

If you help me with this one will very helpful for me. And, for Firebase database access how should I get?...is there any way to dump all the data or give me access to the control panel. Thanks in advance.

@nafil-gigsboard
Copy link

Run these commands first

flutter pub get
flutter doctor
flutter pub upgrade
flutter pub run build_runner build --delete-conflicting-outputs

after that rename main_dev.dart to main.dart

then run
flutter run

this is the steps i have tried to run the project.

@KhoaSuperman
Copy link
Owner

I updated my development environment in readme. Unfortunately I cannot provide my setup in MACOSX right now

@aggarwalpulkit596
Copy link

@KhoaSuperman how does the user goes from splash to login screen or home? i don't see any route there

@KhoaSuperman
Copy link
Owner

@aggarwalpulkit596
image

add this code to authentication_bloc.dart then it should work

@aggarwalpulkit596
Copy link

Thanks although I already did this for both the states

@KhoaSuperman
Copy link
Owner

image

There're many ways to implement splash screen. I treat splash as state (not standalone screen) because when app is open, it need do initialize data (setup local database, prepare session, preload photo, etc ... ). You can choose the way that suit for your case :)

@aggarwalpulkit596
Copy link

Btw there's a white screen for 1-2 sec before the actual rendering of the application and if you need to fix that you need to implement the native splash screen for both platforms. :)

@KhoaSuperman
Copy link
Owner

KhoaSuperman commented Jan 16, 2021

yes. please try release build, the white screen stay longer in debug build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants