list_lib 0.0.10 copy "list_lib: ^0.0.10" to clipboard
list_lib: ^0.0.10 copied to clipboard

ticket library.

example/lib/main.dart

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,
      // ),
      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: 167,
        BaseURL: 'test.arco.sa',
        UserName: 's.hasan',
        CustomerId: 'CIN0064283',
        isComplains: false,
        Token:
            'eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoicy5oYXNhbiIsIlVzZXJOYW1lIjoicy5oYXNhbiIsIk5hbWUiOiJBYmR1bCBNdWhhaWVtZWVuIiwiRW1wbG95ZWVJZCI6IjMwMiIsIlVzZXJUeXBlIjoiMSIsIkN1c3RvbWVySWQiOiIiLCJFbWFpbCI6Im0uYWJkdWxtdWhhaW1lbkBhcmNvLnNhIiwiTW9iaWxlTnVtYmVyIjoiMDU0MzY5OTM3MiIsImV4cCI6MTY5OTg3MTE5MiwiaXNzIjoiZXJwLmFyY28uY29tIiwiYXVkIjoiZXJwLmFyY28uY29tIn0.gaUvIZJKxcHzle47th8yOvUbI3HL5Zl5yn0UfPcAQ4Y'),
    const listPage(
        EntityTypeId: 167,
        BaseURL: 'test.arco.sa',
        UserName: 's.hasan',
        CustomerId: 'CIN0000002',
        Token:
            'eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoicy5oYXNhbiIsIlVzZXJOYW1lIjoicy5oYXNhbiIsIk5hbWUiOiJBYmR1bCBNdWhhaWVtZWVuIiwiRW1wbG95ZWVJZCI6IjMwMiIsIlVzZXJUeXBlIjoiMSIsIkN1c3RvbWVySWQiOiIiLCJFbWFpbCI6Im0uYWJkdWxtdWhhaW1lbkBhcmNvLnNhIiwiTW9iaWxlTnVtYmVyIjoiMDU0MzY5OTM3MiIsImV4cCI6MTY5OTU5NTgzOCwiaXNzIjoiZXJwLmFyY28uY29tIiwiYXVkIjoiZXJwLmFyY28uY29tIn0.WxACOYEL1Ree-rsNIR6U2ejQveYVMff7Z-veNJAhASQ'),
  ];
  @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',
            ),
          ]),
    );
  }
}