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.
34 lines
1006 B
34 lines
1006 B
import 'package:flutter/material.dart'; |
|
import 'package:info_tren/pages/main/main_page.dart'; |
|
|
|
class MainPageMaterial extends MainPageShared { |
|
@override |
|
Widget build(BuildContext context) { |
|
return Scaffold( |
|
appBar: AppBar( |
|
title: Text(pageTitle), |
|
centerTitle: true, |
|
), |
|
body: SafeArea( |
|
child: Center( |
|
child: Column( |
|
mainAxisSize: MainAxisSize.min, |
|
children: options.map((option) => ElevatedButton( |
|
child: Text( |
|
option.name, |
|
style: Theme.of(context).textTheme.button?.copyWith(fontSize: 18), |
|
), |
|
onPressed: option.action != null ? () => option.action!(context) : null, |
|
)).map((w) => Padding( |
|
padding: const EdgeInsets.fromLTRB(4, 2, 4, 2), |
|
child: SizedBox( |
|
width: double.infinity, |
|
child: w, |
|
), |
|
)).toList(), |
|
), |
|
), |
|
), |
|
); |
|
} |
|
}
|
|
|