34 lines
847 B
Dart
34 lines
847 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:sk_base_mobile/router/router.dart';
|
|
import 'package:sk_base_mobile/router/router.util.dart';
|
|
import 'package:sk_base_mobile/widgets/core/sk_ink.dart';
|
|
|
|
class GuideModel {
|
|
final String title;
|
|
final String route;
|
|
GuideModel({required this.title, required this.route});
|
|
}
|
|
|
|
class GuidePage extends StatelessWidget {
|
|
GuidePage({super.key});
|
|
final guides = [
|
|
GuideModel(title: 'Guide 1', route: '/guide/1'),
|
|
GuideModel(title: 'Guide 2', route: '/guide/2')
|
|
];
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ListView(
|
|
children: guides.map((e) => buildItem(e)).toList(),
|
|
);
|
|
}
|
|
|
|
Widget buildItem(GuideModel model) {
|
|
return SkInk(
|
|
onTap: () {
|
|
RouterUtil.toNamed(RouteConfig.guide);
|
|
},
|
|
child: Text(model.title),
|
|
);
|
|
}
|
|
}
|