ui: Increase contrast with the cancel buttons
This commit is contained in:
parent
4d6c584841
commit
c4fb69b428
@ -6,6 +6,7 @@ import 'package:mime/mime.dart';
|
|||||||
import 'package:moxxyv2/ui/bloc/navigation_bloc.dart';
|
import 'package:moxxyv2/ui/bloc/navigation_bloc.dart';
|
||||||
import 'package:moxxyv2/ui/bloc/sendfiles_bloc.dart';
|
import 'package:moxxyv2/ui/bloc/sendfiles_bloc.dart';
|
||||||
import 'package:moxxyv2/ui/constants.dart';
|
import 'package:moxxyv2/ui/constants.dart';
|
||||||
|
import 'package:moxxyv2/ui/widgets/cancel_button.dart';
|
||||||
import 'package:moxxyv2/ui/widgets/chat/shared/base.dart';
|
import 'package:moxxyv2/ui/widgets/chat/shared/base.dart';
|
||||||
import 'package:moxxyv2/ui/widgets/chat/shared/image.dart';
|
import 'package:moxxyv2/ui/widgets/chat/shared/image.dart';
|
||||||
import 'package:moxxyv2/ui/widgets/chat/shared/video.dart';
|
import 'package:moxxyv2/ui/widgets/chat/shared/video.dart';
|
||||||
@ -242,9 +243,7 @@ class SendFilesPage extends StatelessWidget {
|
|||||||
Positioned(
|
Positioned(
|
||||||
top: 8,
|
top: 8,
|
||||||
left: 8,
|
left: 8,
|
||||||
child: IconButton(
|
child: CancelButton(
|
||||||
color: Colors.white,
|
|
||||||
icon: const Icon(Icons.close),
|
|
||||||
onPressed: () => context.read<NavigationBloc>().add(PoppedRouteEvent()),
|
onPressed: () => context.read<NavigationBloc>().add(PoppedRouteEvent()),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -6,6 +6,7 @@ import 'package:moxxyv2/ui/bloc/cropbackground_bloc.dart';
|
|||||||
import 'package:moxxyv2/ui/bloc/navigation_bloc.dart';
|
import 'package:moxxyv2/ui/bloc/navigation_bloc.dart';
|
||||||
import 'package:moxxyv2/ui/constants.dart';
|
import 'package:moxxyv2/ui/constants.dart';
|
||||||
import 'package:moxxyv2/ui/widgets/button.dart';
|
import 'package:moxxyv2/ui/widgets/button.dart';
|
||||||
|
import 'package:moxxyv2/ui/widgets/cancel_button.dart';
|
||||||
|
|
||||||
class CropBackgroundPage extends StatefulWidget {
|
class CropBackgroundPage extends StatefulWidget {
|
||||||
|
|
||||||
@ -151,9 +152,7 @@ class CropBackgroundPageState extends State<CropBackgroundPage> {
|
|||||||
left: 8,
|
left: 8,
|
||||||
child: Material(
|
child: Material(
|
||||||
color: const Color.fromRGBO(0, 0, 0, 0),
|
color: const Color.fromRGBO(0, 0, 0, 0),
|
||||||
child: IconButton(
|
child: CancelButton(
|
||||||
color: Colors.white,
|
|
||||||
icon: const Icon(Icons.close),
|
|
||||||
onPressed: () => context.read<NavigationBloc>().add(PoppedRouteEvent()),
|
onPressed: () => context.read<NavigationBloc>().add(PoppedRouteEvent()),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
20
lib/ui/widgets/cancel_button.dart
Normal file
20
lib/ui/widgets/cancel_button.dart
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import 'package:decorated_icon/decorated_icon.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class CancelButton extends StatelessWidget {
|
||||||
|
|
||||||
|
const CancelButton({required this.onPressed, Key? key}) : super(key: key);
|
||||||
|
final void Function() onPressed;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return IconButton(
|
||||||
|
color: Colors.white,
|
||||||
|
icon: const DecoratedIcon(
|
||||||
|
Icons.close,
|
||||||
|
shadows: [BoxShadow(blurRadius: 8)],
|
||||||
|
),
|
||||||
|
onPressed: onPressed,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user