devaloop_main_page 0.0.2 copy "devaloop_main_page: ^0.0.2" to clipboard
devaloop_main_page: ^0.0.2 copied to clipboard

Main page: Main menu, sub menus and contents of each menu..

Main page: Main menu, sub menus and contents of each menu.

Usage #

import 'package:flutter/material.dart';
import 'package:devaloop_main_page/main_page.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Main Page',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.blue.shade900),
        useMaterial3: true,
      ),
      home: MainPage(
        appName: 'CareLab',
        appIcon: Image.asset(
          'assets/images/app-logo.png',
          height: 16,
          width: 16,
        ),
        onTapAppIconAndName: () {},
        onTapUserInfo: () {},
        userInfo: 'user@gmail.com',
        mainMenus: const [
          MainMenu(
            text: 'Home',
            icon: Icon(Icons.home),
            content: Text('Content for Home'),
          ),
          MainMenu(
            text: 'Check Up',
            icon: Icon(Icons.app_registration),
            subMenus: [
              SubMenu(
                text: 'Item',
                icon: Icon(Icons.healing),
                content: Text('Content for Clinical Check Up'),
              ),
              SubMenu(
                text: 'Packages',
                icon: Icon(Icons.medical_services),
                content: Text('Content for Packages'),
              ),
            ],
          ),
          MainMenu(
            text: 'Payment',
            icon: Icon(Icons.payment),
            content: Text('Content for Payment'),
          ),
          MainMenu(
            text: 'Scheduling',
            icon: Icon(Icons.schedule),
            content: Text('Content for Scheduling'),
          ),
          MainMenu(
            text: 'Result',
            icon: Icon(Icons.file_copy),
            content: Text('Content for Result'),
          ),
        ],
      ),
    );
  }
}
2
likes
140
points
24
downloads

Publisher

verified publisherdevaloop.com

Weekly Downloads

Main page: Main menu, sub menus and contents of each menu..

Repository (GitHub)
View/report issues

Documentation

API reference

License

LGPL-2.1 (license)

Dependencies

flutter

More

Packages that depend on devaloop_main_page