|
@@ -15,6 +15,7 @@ import 'package:clipboard/clipboard.dart';
|
|
import 'package:dartz/dartz.dart' as dartz;
|
|
import 'package:dartz/dartz.dart' as dartz;
|
|
import 'package:easy_localization/easy_localization.dart';
|
|
import 'package:easy_localization/easy_localization.dart';
|
|
import 'package:flowy_infra/size.dart';
|
|
import 'package:flowy_infra/size.dart';
|
|
|
|
+import 'package:flowy_infra/theme.dart';
|
|
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
|
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
|
import 'package:flowy_infra_ui/widget/rounded_button.dart';
|
|
import 'package:flowy_infra_ui/widget/rounded_button.dart';
|
|
import 'package:flowy_sdk/log.dart';
|
|
import 'package:flowy_sdk/log.dart';
|
|
@@ -112,7 +113,6 @@ class DocumentShareButton extends StatelessWidget {
|
|
|
|
|
|
@override
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
Widget build(BuildContext context) {
|
|
- double buttonWidth = 60;
|
|
|
|
return BlocProvider(
|
|
return BlocProvider(
|
|
create: (context) => getIt<DocShareBloc>(param1: view),
|
|
create: (context) => getIt<DocShareBloc>(param1: view),
|
|
child: BlocListener<DocShareBloc, DocShareState>(
|
|
child: BlocListener<DocShareBloc, DocShareState>(
|
|
@@ -130,6 +130,7 @@ class DocumentShareButton extends StatelessWidget {
|
|
},
|
|
},
|
|
child: BlocBuilder<DocShareBloc, DocShareState>(
|
|
child: BlocBuilder<DocShareBloc, DocShareState>(
|
|
builder: (context, state) {
|
|
builder: (context, state) {
|
|
|
|
+ final theme = context.watch<AppTheme>();
|
|
return ChangeNotifierProvider.value(
|
|
return ChangeNotifierProvider.value(
|
|
value: Provider.of<AppearanceSetting>(context, listen: true),
|
|
value: Provider.of<AppearanceSetting>(context, listen: true),
|
|
child: Selector<AppearanceSetting, Locale>(
|
|
child: Selector<AppearanceSetting, Locale>(
|
|
@@ -137,16 +138,15 @@ class DocumentShareButton extends StatelessWidget {
|
|
builder: (ctx, _, child) => ConstrainedBox(
|
|
builder: (ctx, _, child) => ConstrainedBox(
|
|
constraints: const BoxConstraints.expand(
|
|
constraints: const BoxConstraints.expand(
|
|
height: 30,
|
|
height: 30,
|
|
- // minWidth: buttonWidth,
|
|
|
|
width: 100,
|
|
width: 100,
|
|
),
|
|
),
|
|
child: RoundedTextButton(
|
|
child: RoundedTextButton(
|
|
title: LocaleKeys.shareAction_buttonText.tr(),
|
|
title: LocaleKeys.shareAction_buttonText.tr(),
|
|
fontSize: 12,
|
|
fontSize: 12,
|
|
borderRadius: Corners.s6Border,
|
|
borderRadius: Corners.s6Border,
|
|
- color: Colors.lightBlue,
|
|
|
|
- onPressed: () => _showActionList(
|
|
|
|
- context, Offset(-(buttonWidth / 2), 10)),
|
|
|
|
|
|
+ color: theme.main1,
|
|
|
|
+ onPressed: () =>
|
|
|
|
+ _showActionList(context, const Offset(0, 10)),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
@@ -193,7 +193,7 @@ class DocumentShareButton extends StatelessWidget {
|
|
});
|
|
});
|
|
actionList.show(
|
|
actionList.show(
|
|
context,
|
|
context,
|
|
- anchorDirection: AnchorDirection.bottomWithCenterAligned,
|
|
|
|
|
|
+ anchorDirection: AnchorDirection.bottomWithRightAligned,
|
|
anchorOffset: offset,
|
|
anchorOffset: offset,
|
|
);
|
|
);
|
|
}
|
|
}
|