panely 0.1.5 panely: ^0.1.5 copied to clipboard
Dashboard build with Flutter
import 'package:example/pages/elements_page.dart';
import 'package:example/pages/empty_page.dart';
import 'package:example/pages/navigation_page.dart';
import 'package:example/pages/settings_page.dart';
import 'package:flutter/material.dart';
import 'package:panely/components/sidebar/sidebar_widget.dart';
import 'package:panely/controller.dart';
import 'package:panely/components/sidebar/sidebar.dart';
import 'package:panely/components/sidebar/sidebar_configuration.dart';
import 'package:panely/panely.dart';
void main() {
runApp(MainApp());
}
class MainApp extends StatelessWidget {
MainApp({super.key});
final PanelyController controller = PanelyController();
@override
Widget build(BuildContext context) {
return MaterialApp(
// theme: ThemeData.dark(),
home: Panely(
controller: controller,
panelTitle: "Panely - Dashboard",
sidebar: PanelySidebar(
configuration: const PanelySidebarConfiguration(
viewMode: PanelySidebarViewMode.responsive,
),
menuItems: [
PanelySidebarButton(
title: "Navigation Example",
icon: Icons.home,
page: NavigationPage(),
),
PanelySidebarButton(
title: "Empty page",
page: EmptyPage(),
),
PanelySidebarButton(title: "UI Components", icon: Icons.tab, page: ElementsPage()),
const PanelySidebarSpacer(),
const PanelySidebarDivider(),
PanelySidebarButton(
title: "Settings",
icon: Icons.settings,
page: SettingsPage(),
),
],
),
),
);
}
}