dateapp/lib/widgets/dialogs/about.dart

59 lines
1.8 KiB
Dart
Raw Permalink Normal View History

2024-03-03 18:04:45 +07:00
import 'package:flutter/material.dart';
import '../license.dart';
import '../../constants/info.dart';
Future<void> aboutDialogBuilder(BuildContext context) {
2024-03-04 19:09:36 +07:00
final textTheme = Theme.of(context).textTheme;
2024-03-03 18:04:45 +07:00
return showDialog<void>(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Row(children: <Widget>[
Container(
width: 80,
height: 80,
decoration: const BoxDecoration(
image: DecorationImage(
alignment: Alignment.centerLeft,
2024-03-04 19:09:36 +07:00
image: ExactAssetImage(iconPathPng))),
2024-03-03 18:04:45 +07:00
),
2024-03-07 19:24:35 +07:00
Expanded(
2024-03-04 19:09:36 +07:00
child: Column(
2024-03-03 18:04:45 +07:00
crossAxisAlignment: CrossAxisAlignment.start,
children: [
2024-03-04 19:09:36 +07:00
Text("Date Calculator",
style:
TextStyle(fontSize: textTheme.headlineSmall?.fontSize)),
Text("v$versionString",
style: TextStyle(fontSize: textTheme.bodyLarge?.fontSize)),
2024-03-03 18:04:45 +07:00
],
),
)
]),
content: const Text('Date Calculator by WinsDominoes and AtiusAmy'),
actions: <Widget>[
TextButton(
style: TextButton.styleFrom(
textStyle: Theme.of(context).textTheme.labelLarge,
),
child: const Text('View Licenses'),
onPressed: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) => LicensePageCustom()));
},
),
TextButton(
style: TextButton.styleFrom(
textStyle: Theme.of(context).textTheme.labelLarge,
),
child: const Text('Close'),
onPressed: () {
Navigator.of(context).pop();
},
),
],
);
},
);
}