Last active
May 25, 2019 12:34
-
-
Save ponnamkarthik/a0a5ab5e61e4e6bd71f35b1ffd0562c9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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'; | |
import 'package:flutter_demo_provider/app_state.dart'; | |
import 'package:provider/provider.dart'; | |
class TextDisplay extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
final appState = Provider.of<AppState>(context); | |
return Container( | |
padding: const EdgeInsets.all(16.0), | |
child: Text( | |
appState.getDisplayText, | |
style: TextStyle( | |
fontSize: 24.0, | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment