Created
          August 16, 2020 03:28 
        
      - 
      
- 
        Save plateaukao/ad59f2862b72b7948ded63fa9e10d141 to your computer and use it in GitHub Desktop. 
    dart example with AppLocalizations
  
        
  
    
      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:l10n_demo/l10n/app_localizations.dart'; // Add this line. | |
| void main() { | |
| runApp(MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| // Add the `localizationsDelegate` and `supportedLocales` lines. | |
| localizationsDelegates: AppLocalizations.localizationsDelegates, | |
| supportedLocales: AppLocalizations.supportedLocales, | |
| home: MyHomePage(title: 'Flutter Demo Home Page'), | |
| ); | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment