You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.3 KiB
56 lines
1.3 KiB
import 'package:flutter/material.dart'; |
|
import 'package:flutter_example_packages/base/package/package_dialog.dart'; |
|
|
|
class PackageInfoDialog extends StatelessWidget { |
|
const PackageInfoDialog({ |
|
super.key, |
|
required this.package, |
|
}); |
|
|
|
final PackageDialog package; |
|
|
|
@override |
|
Widget build(BuildContext context) { |
|
final theme = Theme.of(context); |
|
|
|
return Dialog( |
|
child: Padding( |
|
padding: const EdgeInsets.all(20), |
|
child: Column( |
|
mainAxisSize: MainAxisSize.min, |
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
children: [ |
|
Text( |
|
package.key, |
|
textAlign: TextAlign.left, |
|
style: theme.textTheme.titleSmall, |
|
), |
|
const SizedBox(height: 15), |
|
Text( |
|
package.message, |
|
textAlign: TextAlign.left, |
|
style: theme.textTheme.bodyLarge?.copyWith( |
|
height: 1.5, |
|
), |
|
), |
|
const SizedBox(height: 20), |
|
Row( |
|
children: [ |
|
const Spacer(), |
|
OutlinedButton( |
|
onPressed: () { |
|
Navigator.of(context).pop(); |
|
}, |
|
child: const Text("Close"), |
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
], |
|
), |
|
), |
|
); |
|
} |
|
}
|
|
|