mukodo cucc
This commit is contained in:
@@ -3,7 +3,7 @@ import 'package:filcnaplo_mobile_ui/common/profile_image/profile_image.dart';
|
||||
import 'package:filcnaplo_mobile_ui/screens/settings/settings_screen.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:sliding_sheet/sliding_sheet.dart';
|
||||
import 'package:wtf_sliding_sheet/wtf_sliding_sheet.dart';
|
||||
|
||||
class ProfileButton extends StatelessWidget {
|
||||
const ProfileButton({Key? key, required this.child}) : super(key: key);
|
||||
@@ -12,10 +12,13 @@ class ProfileButton extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final bool pMode = Provider.of<SettingsProvider>(context, listen: false).presentationMode;
|
||||
final bool pMode =
|
||||
Provider.of<SettingsProvider>(context, listen: false).presentationMode;
|
||||
|
||||
return ProfileImage(
|
||||
backgroundColor: !pMode ? child.backgroundColor : Theme.of(context).colorScheme.secondary,
|
||||
backgroundColor: !pMode
|
||||
? child.backgroundColor
|
||||
: Theme.of(context).colorScheme.secondary,
|
||||
heroTag: child.heroTag,
|
||||
key: child.key,
|
||||
name: !pMode ? child.name : "Béla",
|
||||
|
||||
@@ -1,42 +1,46 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:sliding_sheet/sliding_sheet.dart' as ss;
|
||||
import 'package:wtf_sliding_sheet/wtf_sliding_sheet.dart' as ss;
|
||||
|
||||
void showSlidingBottomSheet({required Widget child, required BuildContext context}) => ss.showSlidingBottomSheet(context,
|
||||
useRootNavigator: true,
|
||||
builder: (context) => ss.SlidingSheetDialog(
|
||||
cornerRadius: 16,
|
||||
cornerRadiusOnFullscreen: 0,
|
||||
avoidStatusBar: true,
|
||||
color: Theme.of(context).colorScheme.background,
|
||||
duration: const Duration(milliseconds: 400),
|
||||
snapSpec: const ss.SnapSpec(
|
||||
snap: true,
|
||||
snappings: [0.5, 1.0],
|
||||
positioning: ss.SnapPositioning.relativeToAvailableSpace,
|
||||
),
|
||||
headerBuilder: (context, state) {
|
||||
return Material(
|
||||
void showSlidingBottomSheet(
|
||||
{required Widget child, required BuildContext context}) =>
|
||||
ss.showSlidingBottomSheet(context,
|
||||
useRootNavigator: true,
|
||||
builder: (context) => ss.SlidingSheetDialog(
|
||||
cornerRadius: 16,
|
||||
cornerRadiusOnFullscreen: 0,
|
||||
avoidStatusBar: true,
|
||||
color: Theme.of(context).colorScheme.background,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey,
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
height: 4.0,
|
||||
width: 60.0,
|
||||
margin: const EdgeInsets.all(12.0),
|
||||
),
|
||||
],
|
||||
duration: const Duration(milliseconds: 400),
|
||||
snapSpec: const ss.SnapSpec(
|
||||
snap: true,
|
||||
snappings: [0.5, 1.0],
|
||||
positioning: ss.SnapPositioning.relativeToAvailableSpace,
|
||||
),
|
||||
);
|
||||
},
|
||||
builder: (context, state) {
|
||||
return Material(
|
||||
color: Theme.of(context).colorScheme.background,
|
||||
child: Padding(padding: const EdgeInsets.fromLTRB(12.0, 0, 12.0, 8.0), child: child),
|
||||
);
|
||||
},
|
||||
));
|
||||
headerBuilder: (context, state) {
|
||||
return Material(
|
||||
color: Theme.of(context).colorScheme.background,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey,
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
height: 4.0,
|
||||
width: 60.0,
|
||||
margin: const EdgeInsets.all(12.0),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
builder: (context, state) {
|
||||
return Material(
|
||||
color: Theme.of(context).colorScheme.background,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.fromLTRB(12.0, 0, 12.0, 8.0),
|
||||
child: child),
|
||||
);
|
||||
},
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user