• 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
  • root
  • root_controller.dart
  • Update to version 3.0 · c3e75619
    c3e75619 Browse Files
    jonataslaw authored 2020-06-26 14:03:55 -0300
root_controller.dart 414 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
import 'package:flutter/material.dart';
import 'package:get/src/state/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();
  }
}