list_lib 0.0.4 list_lib: ^0.0.4 copied to clipboard
ticket library.
import 'package:flutter/material.dart';
import 'package:list_lib/list_lib.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(
// This is the theme of your application.
//
// TRY THIS: Try running your application with "flutter run". You'll see
// the application has a blue toolbar. Then, without quitting the app,
// try changing the seedColor in the colorScheme below to Colors.green
// and then invoke "hot reload" (save your changes or press the "hot
// reload" button in a Flutter-supported IDE, or press "r" if you used
// the command line to start the app).
//
// Notice that the counter didn't reset back to zero; the application
// state is not lost during the reload. To reset the state, use hot
// restart instead.
//
// This works for code too, not just values: Most code changes can be
// tested with just a hot reload.
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: MyHomePage(title: 'sample'),
);
}
}
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: 10404,
BaseURL: 'test.arco.sa',
UserName: 's.hasan',
Token:
'eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoicy5oYXNhbiIsIlVzZXJOYW1lIjoicy5oYXNhbiIsIk5hbWUiOiJTLkguIE1vaGFtbWVkIEhhc2FuIiwiRW1wbG95ZWVJZCI6IjMwMiIsIlVzZXJUeXBlIjoiMSIsIkN1c3RvbWVySWQiOiIiLCJFbWFpbCI6Im0uYWJkdWxtdWhhaW1lbkBhcmNvLnNhIiwiTW9iaWxlTnVtYmVyIjoiMDU0MzY5OTM3MiIsImV4cCI6MTY5NjA4MzQ5MywiaXNzIjoiZXJwLmFyY28uY29tIiwiYXVkIjoiZXJwLmFyY28uY29tIn0.ErIsXxEvM5S5bw22R81mG5IGz4NrxTXgfU8rB4VYU_s'),
const listPage(
EntityTypeId: 167,
BaseURL: 'test.arco.sa',
UserName: 's.hasan',
Token:
'eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoicy5oYXNhbiIsIlVzZXJOYW1lIjoicy5oYXNhbiIsIk5hbWUiOiJTLkguIE1vaGFtbWVkIEhhc2FuIiwiRW1wbG95ZWVJZCI6IjMwMiIsIlVzZXJUeXBlIjoiMSIsIkN1c3RvbWVySWQiOiIiLCJFbWFpbCI6Im0uYWJkdWxtdWhhaW1lbkBhcmNvLnNhIiwiTW9iaWxlTnVtYmVyIjoiMDU0MzY5OTM3MiIsImV4cCI6MTY5NjQ4Mzc4OCwiaXNzIjoiZXJwLmFyY28uY29tIiwiYXVkIjoiZXJwLmFyY28uY29tIn0.0qwuG4vRkseh5AUX0AIvLKEuXc7DqgPPSJtTzoEUjmY'),
];
@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',
),
BottomNavigationBarItem(
icon: Icon(Icons.list, color: Colors.green),
label: 'Individual Ticket',
),
]),
);
}
}