Skip to content

Commit

Permalink
Add localization to example (#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
amantoux authored Aug 15, 2024
1 parent 817b2e0 commit 096cd1c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/fleather/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:fleather/fleather.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:image_picker/image_picker.dart';
import 'package:url_launcher/url_launcher.dart';

Expand All @@ -17,6 +18,13 @@ class FleatherApp extends StatelessWidget {

@override
Widget build(BuildContext context) => MaterialApp(
localizationsDelegates: const [
FleatherLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate
],
supportedLocales: FleatherLocalizations.supportedLocales,
debugShowCheckedModeBanner: false,
theme: ThemeData.light(),
darkTheme: ThemeData.dark(),
Expand Down
2 changes: 2 additions & 0 deletions packages/fleather/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ environment:
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
url_launcher: ^6.1.5
image_picker: ^1.0.7
fleather:
Expand Down

0 comments on commit 096cd1c

Please sign in to comment.