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.

Libraries

flutter_snow_base