Revert "Rename everything filcnaplo-related to refilc"

This reverts commit d1a9625d93.
This commit is contained in:
Pearoo
2023-09-19 18:16:57 +02:00
parent d1a9625d93
commit 7b517b333a
669 changed files with 39481 additions and 39799 deletions

View File

@@ -0,0 +1,22 @@
import 'package:filcnaplo_mobile_ui/common/bottom_sheet_menu/rounded_bottom_sheet.dart';
import 'package:flutter/material.dart';
class BottomSheetMenu extends StatelessWidget {
const BottomSheetMenu({Key? key, this.items = const []}) : super(key: key);
final List<Widget> items;
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: items,
),
);
}
}
void showBottomSheetMenu(BuildContext context, {List<Widget> items = const []}) =>
showRoundedModalBottomSheet(context, child: BottomSheetMenu(items: items));

View File

@@ -0,0 +1,19 @@
import 'package:filcnaplo_mobile_ui/common/panel/panel_button.dart';
import 'package:flutter/material.dart';
class BottomSheetMenuItem extends StatelessWidget {
const BottomSheetMenuItem({Key? key, required this.onPressed, required this.title, this.icon}) : super(key: key);
final void Function()? onPressed;
final Widget? title;
final Widget? icon;
@override
Widget build(BuildContext context) {
return PanelButton(
onPressed: onPressed,
leading: icon,
title: title,
);
}
}

View File

@@ -0,0 +1,70 @@
import 'package:filcnaplo/theme/colors/colors.dart';
import 'package:flutter/material.dart';
class RoundedBottomSheet extends StatelessWidget {
const RoundedBottomSheet({Key? key, this.child, this.borderRadius = 12.0, this.shrink = true, this.showHandle = true}) : super(key: key);
final Widget? child;
final double borderRadius;
final bool shrink;
final bool showHandle;
@override
Widget build(BuildContext context) {
return AnimatedContainer(
duration: const Duration(milliseconds: 500),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.background,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(borderRadius),
topRight: Radius.circular(borderRadius),
),
),
child: SafeArea(
child: Column(
mainAxisSize: shrink ? MainAxisSize.min : MainAxisSize.max,
children: [
if (showHandle)
Container(
width: 42.0,
height: 4.0,
margin: const EdgeInsets.only(top: 12.0, bottom: 4.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(45.0),
color: AppColors.of(context).text.withOpacity(0.10),
),
),
if (child != null) child!,
SizedBox(height: MediaQuery.of(context).padding.bottom),
],
),
),
);
}
}
Future<T?> showRoundedModalBottomSheet<T>(
BuildContext context, {
required Widget child,
bool rootNavigator = true,
}) async {
return await showModalBottomSheet<T>(
context: context,
backgroundColor: const Color(0x00000000),
elevation: 0,
isDismissible: true,
useRootNavigator: rootNavigator,
builder: (context) => RoundedBottomSheet(child: child));
}
PersistentBottomSheetController<T> showRoundedBottomSheet<T>(
BuildContext context, {
required Widget child,
}) {
return showBottomSheet<T>(
context: context,
backgroundColor: const Color(0x00000000),
elevation: 12.0,
builder: (context) => RoundedBottomSheet(child: child),
);
}