list_lib 0.0.35 list_lib: ^0.0.35 copied to clipboard
ticket library.
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:flutter/services.dart';
import 'package:ticket_lib/ticket_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(
// 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: 'test.arco.sa',
CustomerId: 'CIN0127714',
PageName: 'Customer care',
Lang: 'Eng', // Lang = `Arabic || English`
HourlyURL: 'test.arco.sa:620', // test.arco.sa:620
Token:
'eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiQ0lOMDA2NDI4MyIsIlVzZXJOYW1lIjoiQ0lOMDA2NDI4MyIsIk5hbWUiOiIiLCJFbXBsb3llZUlkIjoiIiwiVXNlclR5cGUiOiI0IiwiQ3VzdG9tZXJJZCI6IkNJTjAwNjQyODMiLCJFbWFpbCI6IiIsIk1vYmlsZU51bWJlciI6IiIsImV4cCI6MTcxMTQzNjk4MywiaXNzIjoiZXJwLmFyY28uY29tIiwiYXVkIjoiZXJwLmFyY28uY29tIn0.l3cFdm8ReF2fDZt15WY3rxr0s-InCeny681RllahT0g'),
];
@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',
),
]),
);
}
}