TF-381 Add logout action in browser new UI
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
|
||||
import 'package:core/core.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
|
||||
class AppActionSheetActionBuilder extends CupertinoActionSheetActionBuilder {
|
||||
|
||||
final Color? bgColor;
|
||||
final EdgeInsets? iconLeftPadding;
|
||||
|
||||
AppActionSheetActionBuilder(
|
||||
Key key,
|
||||
SvgPicture actionIcon,
|
||||
String actionName,
|
||||
{
|
||||
this.bgColor,
|
||||
this.iconLeftPadding,
|
||||
}
|
||||
) : super(key, actionIcon, actionName);
|
||||
|
||||
@override
|
||||
Widget build() {
|
||||
return Container(
|
||||
color: bgColor ?? Colors.white,
|
||||
child: CupertinoActionSheetAction(
|
||||
key: key,
|
||||
child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
Padding(
|
||||
padding: iconLeftPadding ?? EdgeInsets.only(left: 12, right: 16),
|
||||
child: actionIcon),
|
||||
Expanded(child: Text(actionName, textAlign: TextAlign.left, style: actionTextStyle())),
|
||||
]),
|
||||
onPressed: () => onCupertinoActionSheetActionClick?.call(null),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user