loadable error screen, reload actions, autoreload
This commit is contained in:
@ -1,29 +0,0 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart';
|
||||
|
||||
class ListItemNavigator extends StatelessWidget {
|
||||
const ListItemNavigator({super.key, required this.icon, required this.text, required this.target, this.onLongPress, this.arrow = true});
|
||||
|
||||
final IconData icon;
|
||||
final String text;
|
||||
final bool arrow;
|
||||
|
||||
final Widget target;
|
||||
|
||||
final GestureLongPressCallback? onLongPress;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
onTabAction() => pushScreen(context, withNavBar: false, screen: target); //Navigator.push(context, MaterialPageRoute(builder: (context) => target));
|
||||
onLongPressAction() => onLongPress;
|
||||
|
||||
return ListTile(
|
||||
leading: Icon(icon),
|
||||
title: Text(text),
|
||||
trailing: arrow ? const Icon(Icons.arrow_right) : null,
|
||||
onTap: onTabAction,
|
||||
onLongPress: onLongPressAction,
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user