Created
May 14, 2019 10:50
-
-
Save devrnt/4b2475e562ca1b6cb1abddfb34713110 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class FlavorConfig extends InheritedWidget { | |
final Widget child; | |
final FlavorBuild flavorBuild; | |
FlavorConfig({@required this.child, @required this.flavorBuild}); | |
static FlavorConfig of(BuildContext context) => | |
context.inheritFromWidgetOfExactType(FlavorConfig); | |
@override | |
bool updateShouldNotify(InheritedWidget oldWidget) => false; | |
} | |
enum FlavorBuild { Free, Pro } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment