Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:easytickets/src/backend/utils/textStyleReferences.dart';
- import 'package:firebase_auth/firebase_auth.dart';
- import 'package:flutter/material.dart';
- import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
- class AppInformationDialog {
- Color imageColor = Color(0xFF121212);
- Future<void> showAlertDialog(BuildContext context, FirebaseUser user, String appVersion) async {
- showDialog(
- barrierDismissible: true,
- context: context,
- builder: (_context) {
- return _alertDialog(context, user, appVersion);
- }
- );
- }
- AlertDialog _alertDialog(BuildContext context, FirebaseUser user, String appVersion) {
- return AlertDialog(
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.all(
- Radius.circular(12)
- )
- ),
- title: Text(
- "Informazioni app",
- style: TextStyleReferences().textNormalBold(),
- ),
- content: Container(
- width: MediaQuery.of(context).size.width,
- height: MediaQuery.of(context).size.height / 5,
- child: Column(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: <Widget>[
- Row(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: <Widget>[
- Icon(MdiIcons.informationOutline, color: imageColor),
- SizedBox(
- width: MediaQuery.of(context).size.width / 20
- ),
- Text(
- "Versione app: $appVersion",
- style: TextStyleReferences().textSettingsAppInformationDialog(),
- softWrap: true
- )
- ]
- ),
- SizedBox(height: MediaQuery.of(context).size.height / 70),
- Row(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: <Widget>[
- Icon(MdiIcons.accountOutline, color: imageColor),
- SizedBox(
- width: MediaQuery.of(context).size.width / 20
- ),
- Text(
- "Autore: Luca Del Corona",
- style: TextStyleReferences().textSettingsAppInformationDialog(),
- softWrap: true
- )
- ]
- ),
- SizedBox(height: MediaQuery.of(context).size.height / 70),
- Row(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: <Widget>[
- Icon(MdiIcons.accountGroupOutline),
- SizedBox(
- width: MediaQuery.of(context).size.width / 20
- ),
- Text(
- "Azienda: Infinity Solutions",
- style: TextStyleReferences().textSettingsAppInformationDialog(),
- softWrap: true
- )
- ]
- ),
- SizedBox(height: MediaQuery.of(context).size.height / 70),
- Row(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: <Widget>[
- Icon(MdiIcons.copyright),
- SizedBox(
- width: MediaQuery.of(context).size.width / 20
- ),
- Text(
- "Tutti i diritti sono riservati",
- style: TextStyleReferences().textSettingsAppInformationDialog(),
- softWrap: true
- )
- ]
- )
- ]
- )
- )
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement