list_lib 0.0.32 list_lib: ^0.0.32 copied to clipboard
ticket library.
import 'package:flutter/material.dart';
import 'package:list_lib/list_lib.dart';
import 'package:list_lib/src/Tabs.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
// theme: ThemeData(
// colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
// useMaterial3: true,
// ),
debugShowCheckedModeBanner: false,
home: MyHomePage(title: 'sample'),
// builder: (context, child) {
// Widget _child = child!;
// return Directionality(
// textDirection: TextDirection.rtl,
// child: _child,
// );
// },
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int myIndex = 0;
final screens = [
const Center(child: Text('Home', style: TextStyle(fontSize: 60))),
const listPage(
EntityTypeId: 167,
BaseURL: '{{BaseURL}}',
CustomerId: '{{CustomerId}}',
PageName: '{{PageName}}',
Lang: '{{Lang}}', // Lang = `Arabic || English`
HourlyURL: '{{HourlyURL}}', // test.arco.sa:620
Token: '{{Token}}'),
];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text(
"Dynamic List Form",
style: TextStyle(color: Colors.white),
),
backgroundColor: Colors.green,
),
body: screens[myIndex],
bottomNavigationBar: BottomNavigationBar(
onTap: (Index) {
setState(() {
myIndex = Index;
});
},
currentIndex: myIndex,
items: const [
BottomNavigationBarItem(
icon: Icon(Icons.home, color: Colors.green),
label: 'Home',
),
BottomNavigationBarItem(
icon: Icon(Icons.list, color: Colors.green),
label: 'Agent',
),
]),
);
}
}