flutter_snow_base 0.1.0+2

  • Readme
  • Changelog
  • Example
  • Installing
  • new63

Flutter Snow Base! 🧰 #

Pub License: BSD-3-Clause Twitter: SnowmanLabs

🧰 A package that provides you the essential tools to use in your project, like:


📄 Table of Contents #

❓ Why should I use #

Flutter snow base helps you to initialize your project with ready tools to use, so if you want to use something, like test your layout on different screens, you can only change a properly to true and voilà! Or you need to pick all the errors that occurs on the app, the device info and send to you when occurs the error, theres no need any efforts to this! You only configure how you want to send, and is working!

🎯 Motivations #

We realized that almost all projects uses the same things as base, like a crash reporter, a flavor config, locales config... So, this package is basically an union of all the common packages through the projects.

📦 Examples #

Examples of to-do apps that used flutter_snow_base as base:

🔧 Install #

Follow this tutorial: Installation tab

🎉 Usage #

NOTE: This package was made in conjunction with Flutter Snow Blower, so if you have some doubts of how to initialize this package in your project, only seed the documentation of Flutter Snow Blower or start a project with it to see how it works!

main.dart file #

void main() {
  RunAppSnow(
    ModularApp(  // Material app
      module: AppModule(),
    ),
    flavorValues: Constants.flavorDev, // Pass your flavor values
    getItInit: () => Resource.setErrorMapper(ErrorMapper.from), // if you want to execute something after flavors but before the app starts to run, this code will run here.
    flavor: Flavor.dev, // Selected flavor
    enableDevicePreview: false, // Enable if you want to use Device Preview.
    errorReporter: (errorDetails) {}, // Use this function to use another crash reporter, like Crashanalytics of firebase.
  );
}

material_app.dart #

This is the minimum configuration to use, you can add another parameters, that is the same of MaterialApp.

class AppWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return SnowMaterialApp(
      theme: AppThemeData.themeDataLight,
      darkTheme: AppThemeData.themeDataDark,
    );
  }
}

Shift + Alt + O -> Organize imports

https://material.io/design/typography/the-type-system.html#type-scale

https://medium.com/flutterando/qual-a-forma-f%C3%A1cil-de-traduzir-seu-app-flutter-para-outros-idiomas-ab5178cf0336 https://pub.dev/packages/i18n_extension#-readme-tab- https://medium.com/flutter-community/handling-network-calls-like-a-pro-in-flutter-31bd30c86be1 https://medium.com/flutter-community/page-transitions-using-themedata-in-flutter-c24afadb0b5d https://medium.com/flutter-community/handling-flutter-errors-with-catcher-efce74397862 https://medium.com/flutter-community/flutter-2019-real-splash-screens-tutorial-16078660c7a1 https://iiro.dev/2018/03/02/separating-build-environments/

Sempre divida os widgets em arquivos, e não em métodos dentro do widget
https://iiro.dev/2018/12/11/splitting-widgets-to-methods-performance-antipattern/
https://iiro.dev/2018/06/18/putting-build-methods-on-a-diet/
Exemplo: https://github.com/roughike/inKino/blob/development/mobile/lib/ui/event_details/event_backdrop_photo.dart
WidgetTesting: https://iiro.dev/2018/08/22/writing-widget-tests-for-navigation-events/

👤 Author #

Snowman labs #

snowmanlabs-logo

🤝 Contributing #

Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.

💚 Show your support #

Give a ⭐️ if this project helped you!

📝 License #

Copyright © 2020 Snowman labs.
This project is BSD-3 Clause licensed.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased #

[0.1.0] - 2020-06-26 #

Added #

  • Initial version of the package.
  • Thanks to Denis Viana and to Lucas Polazzo that made this first version of the package!

example/README.md

This package provides multiple examples, according to the selected architecture.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flutter_snow_base: ^0.1.0+2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_snow_base/flutter_snow_base.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
27
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
63
Learn more about scoring.

We analyzed this package on Jul 10, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.14
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform android

Because:

  • package:flutter_snow_base/flutter_snow_base.dart that imports:
  • package:flutter_snow_base/src/styles/theme_data_snow.dart that imports:
  • package:device_preview/device_preview.dart that imports:
  • package:device_preview/src/device_preview.dart that imports:
  • package:device_preview/src/storage.dart that imports:
  • package:shared_preferences/shared_preferences.dart that imports:
  • package:shared_preferences_linux/shared_preferences_linux.dart that declares support for platforms: linux

Package does not support Flutter platform ios

Because:

  • package:flutter_snow_base/flutter_snow_base.dart that imports:
  • package:flutter_snow_base/src/styles/theme_data_snow.dart that imports:
  • package:device_preview/device_preview.dart that imports:
  • package:device_preview/src/device_preview.dart that imports:
  • package:device_preview/src/storage.dart that imports:
  • package:shared_preferences/shared_preferences.dart that imports:
  • package:shared_preferences_linux/shared_preferences_linux.dart that declares support for platforms: linux

Package does not support Flutter platform linux

Because:

  • package:flutter_snow_base/flutter_snow_base.dart that imports:
  • package:flutter_snow_base/src/snow_material_app.dart that imports:
  • package:flutter_snow_base/src/widgets/flavor_banner/flavor_banner_widget.dart that imports:
  • package:flutter_snow_base/src/widgets/device_info_dialog/device_info_dialog.dart that imports:
  • package:flutter_snow_base/src/config/device_utils.dart that imports:
  • package:device_info/device_info.dart that declares support for platforms: android, ios

Package does not support Flutter platform macos

Because:

  • package:flutter_snow_base/flutter_snow_base.dart that imports:
  • package:flutter_snow_base/src/styles/theme_data_snow.dart that imports:
  • package:device_preview/device_preview.dart that imports:
  • package:device_preview/src/device_preview.dart that imports:
  • package:device_preview/src/storage.dart that imports:
  • package:shared_preferences/shared_preferences.dart that imports:
  • package:shared_preferences_linux/shared_preferences_linux.dart that declares support for platforms: linux

Package does not support Flutter platform web

Because:

  • package:flutter_snow_base/flutter_snow_base.dart that imports:
  • package:flutter_snow_base/src/styles/theme_data_snow.dart that imports:
  • package:device_preview/device_preview.dart that imports:
  • package:device_preview/src/device_preview.dart that imports:
  • package:device_preview/src/storage.dart that imports:
  • package:shared_preferences/shared_preferences.dart that imports:
  • package:shared_preferences_linux/shared_preferences_linux.dart that declares support for platforms: linux

Package does not support Flutter platform windows

Because:

  • package:flutter_snow_base/flutter_snow_base.dart that imports:
  • package:flutter_snow_base/src/styles/theme_data_snow.dart that imports:
  • package:device_preview/device_preview.dart that imports:
  • package:device_preview/src/device_preview.dart that imports:
  • package:device_preview/src/storage.dart that imports:
  • package:shared_preferences/shared_preferences.dart that declares support for platforms: android, ios, linux, macos, web

Package not compatible with SDK dart

Because:

  • flutter_snow_base that is a package requiring null.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
catcher ^0.3.14 0.3.14
device_info ^0.4.2+3 0.4.2+4
device_preview ^0.4.5 0.4.7
dio ^3.0.9 3.0.9
dio_http_cache ^0.2.7 0.2.7
flutter 0.0.0
flutter_localizations 0.0.0
flutter_modular ^1.2.7+1 1.2.7+1 1.3.0-dev.3
intl ^0.16.1 0.16.1
responsive_framework ^0.0.7 0.0.7
Transitive dependencies
_fe_analyzer_shared 5.0.0
analyzer 0.39.12
args 1.6.0
async 2.4.2
build 1.3.0
build_config 0.4.2
charcode 1.1.3
checked_yaml 1.0.2
collection 1.14.12 1.14.13
convert 2.1.1
crypto 2.1.5
csslib 0.16.1
dart_style 1.3.6
file 5.2.1
flutter_mailer 0.5.1 0.6.0-dev.1
flutter_web_plugins 0.0.0
fluttertoast 4.0.1 6.0.1
font_awesome_flutter 8.8.1
freezed_annotation 0.11.0
glob 1.2.0
html 0.14.0+3
http 0.12.1
http_parser 3.1.4
js 0.6.2
json_annotation 3.0.1
json_serializable 3.3.0
logging 0.11.4
mailer 3.0.4
matcher 0.12.8
meta 1.1.8 1.2.2
mime 0.9.6+3
node_interop 1.1.1
node_io 1.1.1
package_config 1.9.3
package_info 0.4.1
path 1.6.4 1.7.0
path_provider_linux 0.0.1+2
path_provider_platform_interface 1.0.2
pedantic 1.9.0 1.9.2
platform 2.2.1
plugin_platform_interface 1.0.2
process 3.0.13
pub_semver 1.4.4
pubspec_parse 0.1.5
quiver 2.1.3
sentry 3.0.1
shared_preferences 0.5.8
shared_preferences_linux 0.0.2+1
shared_preferences_macos 0.0.1+10
shared_preferences_platform_interface 1.0.4
shared_preferences_web 0.1.2+7
sky_engine 0.0.99
source_gen 0.9.5
source_span 1.7.0
sqflite 1.3.1
sqflite_common 1.0.2+1
stack_trace 1.9.5
string_scanner 1.0.5
synchronized 2.2.0+1
term_glyph 1.1.0
typed_data 1.1.6 1.2.0
usage 3.4.2
vector_math 2.0.8 2.1.0-nullsafety
watcher 0.9.7+15
xdg_directories 0.1.0
yaml 2.2.1
Dev dependencies
effective_dart ^1.2.3
flutter_test