- Created generated_plugin_registrant.cc and generated_plugin_registrant.h to manage plugin registration. - Added generated_plugins.cmake for plugin configuration in CMake. - Implemented CMakeLists.txt for the Windows runner, defining build settings and dependencies. - Created Runner.rc for application resources including versioning and icons. - Developed flutter_window.cpp and flutter_window.h to manage the Flutter window lifecycle. - Implemented main.cpp as the entry point for the Windows application. - Added resource.h for resource definitions. - Included app icon in resources. - Created runner.exe.manifest for application settings. - Developed utils.cpp and utils.h for console management and command line argument handling. - Implemented win32_window.cpp and win32_window.h for high DPI-aware window management.
59 lines
1.9 KiB
Dart
59 lines
1.9 KiB
Dart
import 'package:flutter_lucide/flutter_lucide.dart';
|
|
import 'package:marco/helpers/theme/app_theme.dart';
|
|
import 'package:marco/helpers/widgets/my_breadcrumb_item.dart';
|
|
import 'package:marco/helpers/widgets/my_constant.dart';
|
|
import 'package:marco/helpers/widgets/my_responsive.dart';
|
|
import 'package:marco/helpers/widgets/my_router.dart';
|
|
import 'package:marco/helpers/widgets/my_spacing.dart';
|
|
import 'package:marco/helpers/widgets/my_text.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class MyBreadcrumb extends StatelessWidget {
|
|
final List<MyBreadcrumbItem> children;
|
|
final bool hideOnMobile;
|
|
|
|
MyBreadcrumb({super.key, required this.children, this.hideOnMobile = true}) {
|
|
if (MyConstant.constant.defaultBreadCrumbItem != null) {
|
|
children.insert(0, MyConstant.constant.defaultBreadCrumbItem!);
|
|
}
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
List<Widget> list = [];
|
|
for (int i = 0; i < children.length; i++) {
|
|
var item = children[i];
|
|
if (item.active || item.route == null) {
|
|
list.add(MyText.labelMedium(
|
|
children[i].name,
|
|
fontWeight: 500,
|
|
fontSize: 13,
|
|
letterSpacing: 0,
|
|
));
|
|
} else {
|
|
list.add(InkWell(
|
|
onTap: () => {if (item.route != null) MyRouter.pushReplacementNamed(context, item.route!)},
|
|
child: MyText.labelMedium(
|
|
children[i].name,
|
|
fontWeight: 500,
|
|
fontSize: 13,
|
|
letterSpacing: 0,
|
|
color: theme.colorScheme.primary,
|
|
)));
|
|
}
|
|
if (i < children.length - 1) {
|
|
list.add(MySpacing.width(12));
|
|
list.add(Icon(LucideIcons.chevron_right, size: 12));
|
|
list.add(MySpacing.width(12));
|
|
}
|
|
}
|
|
return MyResponsive(builder: (_, __, type) {
|
|
if (type.isMobile && hideOnMobile) {
|
|
return SizedBox();
|
|
} else {
|
|
return Row(mainAxisSize: MainAxisSize.min, children: list);
|
|
}
|
|
});
|
|
}
|
|
}
|