34 lines
1,006 B
Dart
34 lines
1,006 B
Dart
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(),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|