flutter build apk --release --split-per-abi --split-debug-info --obfuscate
dart pub upgrade --null-safety --precompile
flutter pub run "tool/generate_assets.dart" --class-name AssetsCG --output-file "lib\generated\assets.g.dart" --exclude "\fonts\"
flutter pub run "tool/generate_localization.dart" -f keys -S "assets/translations" -O "lib/generated" -o localization.g.dart
flutter pub run flutter_launcher_icons:main
flutter pub run flutter_native_splash:create flutter pub run flutter_native_splash:remove
resConfigs
in app/gradle defaultOptions
- adb shell
- am start -a android.intent.action.VIEW -d "smstretching://stories/6184" ru.smstretching.appstudio
-
Do a request the selected method. Retrieve a json response.
-
Go to
https://app.quicktype.io/
and paste a json there. -
Select options:
Put encoder & decoder in Class
Use method names fromMap() & toMap()
Make all properties required
Make all properties final
-
Copy and paste to the local
.dart
file.
- Put
// ignore_for_file: sort_constructors_first
at the top of the file before imports and remove any module-level comments present. - Rename the model via
Change Occurences
with case-sensitive switch on. - Put
@immutable
decorator before the class declaration. - Make default factory consructor
const
. - Replace
@required this
withrequired this
in the default factory constuctor. Can be united withstep 16
. - Change the order for json serialization -
toMap()
,fromMap()
,toJson()
,fromJson()
. - Put the body of the serialization on the separate flow lines
(using
return
). - Rename
fromMap()
json
parameter tomap
. - Replace
Map<String, dynamic>
withMap<String, Object?>
. - Add type casts and tweak serialization in
fromMap()
. - Add
<String, Object?>
type and tweak serialization intoMap()
. - Use predefined converters in
utils/json_converters.dart
if necessary. - Run
dart fix --apply
to replace any double quotes to the single quotes. - Create
copyWith
and put it before json serializationtoMap()
. - Create
equality
and put it after json serializationfromJson()
. - Put
identical
directly to the return with||
operator. - Create
toString
and put it afterequality
. - Split the long
toString
one liner to lines < 80 chars while keepingkey
:value
on a single line. - Make all class function parameters
final
. - Create a comment for a class definition and a default factory constructor.
- Add comments for each parameter in the class.
- Add static comments to each method in the class.
- Check if class is valid and repeat for all generated classes.