31 lines
911 B
Dart
31 lines
911 B
Dart
|
import 'package:flutter/cupertino.dart';
|
||
|
import 'package:info_tren/pages/main/main_page.dart';
|
||
|
|
||
|
class MainPageCupertino extends MainPageShared {
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return CupertinoPageScaffold(
|
||
|
navigationBar: CupertinoNavigationBar(
|
||
|
middle: Text(pageTitle),
|
||
|
),
|
||
|
child: SafeArea(
|
||
|
child: Center(
|
||
|
child: Column(
|
||
|
mainAxisSize: MainAxisSize.min,
|
||
|
children: options.map((option) => CupertinoButton.filled(
|
||
|
child: Text(option.name),
|
||
|
onPressed: option.action == null ? null : () => option.action!(context),
|
||
|
)).map((w) => Padding(
|
||
|
padding: const EdgeInsets.fromLTRB(4, 2, 4, 2),
|
||
|
child: SizedBox(
|
||
|
width: double.infinity,
|
||
|
child: w,
|
||
|
),
|
||
|
)).toList(),
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
}
|