Skip to content

Flutter-Project-App/TimerApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Timer App

Countdown Time Bloc Pattern, State, UI

Structure

  • assets
    • icons: start with ic_
    • images: start with image_
  • lib
    • data
      • blocs: Bloc on this applocation
      • datasources: Data provider
      • models: Model Data, suffix: _model
      • repositories: list of repository
    • gen: Gen Assets Management
    • pages: Screen, Page of Application, suffix: _page
    • utils
    • widgets: Component reuse on this app, suffix: _widget
    • application.dart: MaterialApp of this app
    • main.dart

Resource Manager

https://pub.dev/packages/flutter_gen

Homebrew

Works with MacOS and Linux.

$ brew install FlutterGen/tap/fluttergen

Pub Global

Works with MacOS, Linux and Windows.

$ dart pub global activate flutter_gen

Generate Model and State

$ flutter pub run build_runner build

Extension

path: lib/utils/extensions.dart

BuildContext

extension StateExtensions on State {
  ThemeData get theme => Theme.of(context);

  TextTheme get textTheme => Theme.of(context).textTheme;

  TextTheme get primaryTextTheme => Theme.of(context).primaryTextTheme;

  TextTheme get accentTextTheme => Theme.of(context).accentTextTheme;

  ColorScheme get colorScheme => Theme.of(context).colorScheme;

  MediaQueryData get mediaQueryData => MediaQuery.of(context);

  Size get size => MediaQuery.of(context).size;
}

State

extension ContextExtensions on BuildContext {
  ThemeData get theme => Theme.of(this);

  TextTheme get textTheme => Theme.of(this).textTheme;

  TextTheme get primaryTextTheme => Theme.of(this).primaryTextTheme;

  TextTheme get accentTextTheme => Theme.of(this).accentTextTheme;

  ColorScheme get colorScheme => Theme.of(this).colorScheme;

  MediaQueryData get mediaQueryData => MediaQuery.of(this);

  Size get size => MediaQuery.of(this).size;
}

CI/CD

This project is config CI/CD with Github Action and build release only for Android.

Work flow:

.github/workflows/dart.yml

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published