• This project
    • Loading...
  • Sign in

flutter_package / fluttertpc_get

Go to a project
Toggle navigation
  • Projects
  • Groups
  • Snippets
  • Help
Toggle navigation pinning
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • fluttertpc_get
  • lib
  • src
  • navigation
  • root
  • root_controller.dart
  • fix(lint/analyser): Added analyser + effective dart · 672095be ...
    672095be Browse Files
    * Reformated all sources under lib
    * Fixed almost all (now) detected lint and type issues
    * Added public api type annotations
    * Broke RxSet api (appeared to be a copy from RxList with wrong methods, this needs to be rewrited)
    * Broke anyone that relied on **wrong** type annotations that were omitted from this package
    * Maybe broke controller close overrides (DisposableInterface from rx core seems to have been always returned a future close method)
    Gabriel Rohden authored 2020-09-04 21:13:18 -0300
root_controller.dart 420 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
import 'package:flutter/material.dart';

import '../../state_manager/simple/get_state.dart';

class GetMaterialController extends GetxController {
  Key key;
  ThemeData theme;
  ThemeMode themeMode;

  void setTheme(ThemeData value) {
    theme = value;
    update();
  }

  void setThemeMode(ThemeMode value) {
    themeMode = value;
    update();
  }

  void restartApp() {
    key = UniqueKey();
    update();
  }
}