mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
[flutter]: add Meterial as the root of ListOverlay
This commit is contained in:
@ -3,6 +3,7 @@ import 'package:flowy_infra/flowy_icon_data_icons.dart';
|
|||||||
import 'package:flowy_infra/image.dart';
|
import 'package:flowy_infra/image.dart';
|
||||||
import 'package:flowy_infra/theme.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/style_widget/hover.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/icon_button.dart';
|
import 'package:flowy_infra_ui/style_widget/icon_button.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/text.dart';
|
import 'package:flowy_infra_ui/style_widget/text.dart';
|
||||||
import 'package:flowy_infra_ui/widget/spacing.dart';
|
import 'package:flowy_infra_ui/widget/spacing.dart';
|
||||||
@ -132,6 +133,12 @@ class CreateItem extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final theme = context.watch<AppTheme>();
|
||||||
|
final config = HoverDisplayConfig(hoverColor: theme.bg3);
|
||||||
|
|
||||||
|
return FlowyHover(
|
||||||
|
config: config,
|
||||||
|
builder: (context, onHover) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
onSelected(viewType);
|
onSelected(viewType);
|
||||||
@ -141,5 +148,7 @@ class CreateItem extends StatelessWidget {
|
|||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
).padding(horizontal: 10, vertical: 10),
|
).padding(horizontal: 10, vertical: 10),
|
||||||
);
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,9 @@ class ListOverlay extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Material(
|
||||||
|
type: MaterialType.transparency,
|
||||||
|
child: Container(
|
||||||
constraints: BoxConstraints.tight(Size(maxWidth, maxHeight)),
|
constraints: BoxConstraints.tight(Size(maxWidth, maxHeight)),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@ -34,6 +36,7 @@ class ListOverlay extends StatelessWidget {
|
|||||||
itemCount: itemCount,
|
itemCount: itemCount,
|
||||||
controller: controller,
|
controller: controller,
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user