Last active
April 15, 2020 16:34
-
-
Save hyochan/3ca8d354e3ff09b2e2348c6fcfcd517e to your computer and use it in GitHub Desktop.
flutter_localized_example/my_widget.dart
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'; | |
import 'package:flutter/services.dart'; | |
import '../utils/localization.dart' show Localization; | |
class MyWidget extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
var localization = Localization.of(context); | |
return Scaffold( | |
primary: true, | |
body: Container( | |
child: Center( | |
child: Text( | |
localization.trans('LOADING'), | |
style: TextStyle( | |
fontSize: 36.0, | |
), | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment