Implement custom copy notification
When copying a message in chat, a notification will now show under the video rather than the block the textfield.
This commit is contained in:
parent
2e52bbebda
commit
870e8ae916
6 changed files with 134 additions and 76 deletions
|
|
@ -4,11 +4,13 @@ import 'package:flutter/material.dart';
|
|||
class AlertMessage extends StatelessWidget {
|
||||
final String message;
|
||||
final IconData icon;
|
||||
final Color? color;
|
||||
|
||||
const AlertMessage({
|
||||
Key? key,
|
||||
required this.message,
|
||||
final this.icon = Icons.info,
|
||||
this.color,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
|
|
@ -18,15 +20,15 @@ class AlertMessage extends StatelessWidget {
|
|||
children: [
|
||||
Icon(
|
||||
icon,
|
||||
color: Colors.grey,
|
||||
color: color ?? Colors.grey,
|
||||
),
|
||||
const SizedBox(width: 5.0),
|
||||
Flexible(
|
||||
child: Text(
|
||||
message,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.grey,
|
||||
color: color ?? Colors.grey,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class _ButtonState extends State<Button> with SingleTickerProviderStateMixin {
|
|||
onPrimary: widget.fill ? null : widget.color,
|
||||
padding: widget.padding,
|
||||
splashFactory: Platform.isIOS ? NoSplash.splashFactory : null,
|
||||
textStyle: TextStyle(fontWeight: FontWeight.bold, fontSize: widget.fontSize),
|
||||
textStyle: TextStyle(fontWeight: FontWeight.w600, fontSize: widget.fontSize),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30.0)),
|
||||
elevation: widget.color == null ? 10.0 : 0.0,
|
||||
).copyWith(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue