app_info_tile 0.0.2
app_info_tile: ^0.0.2 copied to clipboard
A Flutter package template.
app_info_tile #
A Flutter package that provides a simple and elegant way to display app information with license viewing capabilities. Perfect for settings screens and about pages.
Features #
- π± App Information Display: Shows app name, version, and build number
- π License Viewer: Integrated license page access
- π Multi-language Support: Supports 7 languages (English, Japanese, Spanish, Korean, Portuguese, Turkish, Chinese)
- β‘ Riverpod Integration: Built with Flutter Riverpod for efficient state management
- π¨ Customizable UI: Simple ListTile with alert dialog for detailed information
- π¦ Easy Integration: Drop-in widget ready to use
Supported Languages #
- πΊπΈ English (en-US)
- π―π΅ Japanese (ja-JP)
- πͺπΈ Spanish (es-ES)
- π°π· Korean (ko-KR)
- π΅πΉ Portuguese (pt-PT)
- πΉπ· Turkish (tr-TR)
- π¨π³ Chinese (zh-CN)
Installation #
Add this to your package's pubspec.yaml
file:
dependencies:
app_info_tile: ^0.0.1
Then run:
flutter pub get
Usage #
Basic Usage #
import 'package:app_info_tile/app_info_tile.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
class SettingsPage extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
return Scaffold(
appBar: AppBar(title: Text('Settings')),
body: ListView(
children: [
// Other settings tiles...
AppInfoTile(), // Add the app info tile
],
),
);
}
}
Setup with Easy Localization #
This package requires easy_localization
to be set up in your app:
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await EasyLocalization.ensureInitialized();
runApp(
EasyLocalization(
supportedLocales: [
Locale('en', 'US'),
Locale('ja', 'JP'),
Locale('es', 'ES'),
Locale('ko', 'KR'),
Locale('pt', 'PT'),
Locale('tr', 'TR'),
Locale('zh', 'CN'),
],
path: 'assets/translations', // Path to your translation files
fallbackLocale: Locale('en', 'US'),
child: ProviderScope(
child: MyApp(),
),
),
);
}
Required Dependencies #
Make sure your pubspec.yaml
includes these dependencies:
dependencies:
flutter:
sdk: flutter
flutter_riverpod: ^2.6.1
easy_localization: ^3.0.7
package_info_plus: ^8.0.0
app_lang_selector: ^0.0.3
riverpod_helper: ^0.0.3
What it does #
- Displays App Info: The widget shows as a ListTile with an info icon and "About" title
- Opens Dialog: Tapping the tile opens a dialog showing:
- App name
- Version and build number
- License information hint
- License Viewer: The dialog includes a button to open Flutter's built-in license page
- Multi-language: All text is automatically localized based on your app's locale
Customization #
The package provides a clean, ready-to-use widget. For advanced customization, you can:
- Modify the provided localization files
- Use the underlying
AppInfoPod
provider directly for custom UI implementations - Extend the widget by wrapping it in custom containers or adding additional styling
Dependencies #
This package relies on several well-maintained Flutter packages:
package_info_plus
: For accessing app package informationeasy_localization
: For internationalization supportflutter_riverpod
: For state managementapp_lang_selector
: For language selection functionalityriverpod_helper
: For enhanced Riverpod utilities
Contributing #
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
License #
This project is licensed under the MIT License - see the LICENSE file for details.
Support #
If you find this package helpful, please consider:
- β Starring the repository
- π Reporting issues
- π Sponsoring the developer
- π¦ Following @normidar on Twitter