nft 1.0.29+2009302309 copy "nft: ^1.0.29+2009302309" to clipboard
nft: ^1.0.29+2009302309 copied to clipboard

Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase. This template is created by nhancv.

nft #

Flutter Template

Flutter 1.20.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision bbfbf1770c (2 weeks ago) • 2020-08-13 08:33:09 -0700
Engine • revision 9d5b21729f
Tools • Dart 2.9.1

Update app icon #

flutter pub get
flutter pub run flutter_launcher_icons:main

Clone initial setup #

  • Search and Replace All nft to new package id
  • Search and Replace All NFT App to new App display name
  • Search and Replace All com.app.nft to new App bundle id
  • Update directory folder path name of Android (android/app/src/main/kotlin/) same with new App bundle id
  • Remove example folder

Update localization #

Install flutter_intl tool #

  1. Add other locales:
  • Update CFBundleLocalizations in ios/Runner/Info.plist to add new locale
  • Run Tools -> Flutter Intl -> Add Locale
  1. Access to the current locale
Intl.getCurrentLocale()
  1. Change current locale
S.load(Locale('vi'));
  1. Reference the keys in Dart code
Widget build(BuildContext context) {
    return Column(children: [
        Text(
            S.of(context).pageHomeConfirm,
        ),
        Text(
            S.current.pageHomeConfirm,// If you don't have `context` to pass
        ),
    ]);
}

Generate intl via cli #

#https://pub.dev/packages/intl_utils
flutter pub run intl_utils:generate

Structure #

lib
  |-generated                     ---> auto genrated by flutter_intl
  |-I10n                          ---> auto genrated by flutter_intl
    |-intl_en.arb                 ---> define your translation here
  |-models                        ---> places of object models
  |-pages                         ---> define all pages/screens of application
    |-home                        ---> we should organize as app module (eg: home, about, ...) rather then platform module (eg: activity, dialog, ...)
      |-home_provider.dart
      |-home_screen.dart
  |-services                      ---> define app services (database service, network service)
    |-remote
      |-api.dart
      |-auth_api.dart
    |-app_loading.dart
    |-logging.dart
  |-utils                         ---> app utils
    |-app_asset.dart
    |-app_config.dart
    |-app_constant.dart
    |-app_extension.dart
    |-app_helper.dart
    |-app_log.dart
    |-app_route.dart
    |-app_style.dart
    |-app_theme.dart
  |-widgets                       ---> app widgets
  |-main.dart                     ---> each main.dart file point to each env of app. Ex: default main.dart for dev env, create new main_prod.dart for prod env
  |-my_app.dart                   ---> application bootstrap
test                              ---> widget/unit testing
test_driver                       ---> integration testing

Versioning #

version: 1.0.6+2003271407
---
Version name: 1.0.6
Version code: 2003271407

Version name: major.minor.build/patch Version code: yymmddHHMM

  • Remember to increase bold the version name and code also.

https://medium.com/p/2dd558f8b524

Multi env #

  • Create new env factory in app_config.dart.
  • Create new file called main_
  • Build with flutter
flutter build ios -t lib/main_prod.dart

Testing #

flutter test
flutter drive --target=test_driver/app.dart

Release #

9
likes
40
pub points
0%
popularity

Publisher

verified publishernhancv.com

Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase. This template is created by nhancv.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

cupertino_icons, dio, flutter, flutter_localizations, flutter_screenutil, flutter_spinkit, intl, intl_translation, logger, meta, provider

More

Packages that depend on nft