|
@@ -4,24 +4,29 @@ import 'package:flowy_infra/image.dart';
|
|
import 'package:flowy_infra_ui/style_widget/icon_button.dart';
|
|
import 'package:flowy_infra_ui/style_widget/icon_button.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
|
|
+import 'package:provider/provider.dart';
|
|
|
|
+import 'package:flowy_infra/theme.dart';
|
|
|
|
|
|
class MenuTopBar extends StatelessWidget {
|
|
class MenuTopBar extends StatelessWidget {
|
|
const MenuTopBar({Key? key}) : super(key: key);
|
|
const MenuTopBar({Key? key}) : super(key: key);
|
|
@override
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
Widget build(BuildContext context) {
|
|
|
|
+ final theme = context.watch<AppTheme>();
|
|
return BlocBuilder<MenuBloc, MenuState>(
|
|
return BlocBuilder<MenuBloc, MenuState>(
|
|
builder: (context, state) {
|
|
builder: (context, state) {
|
|
return SizedBox(
|
|
return SizedBox(
|
|
height: HomeSizes.topBarHeight,
|
|
height: HomeSizes.topBarHeight,
|
|
child: Row(
|
|
child: Row(
|
|
children: [
|
|
children: [
|
|
- svgWithSize("flowy_logo_with_text", const Size(92, 17)),
|
|
|
|
|
|
+ (theme.isDark
|
|
|
|
+ ? svgWithSize("flowy_logo_dark_mode", const Size(92, 17))
|
|
|
|
+ : svgWithSize("flowy_logo_with_text", const Size(92, 17))),
|
|
const Spacer(),
|
|
const Spacer(),
|
|
FlowyIconButton(
|
|
FlowyIconButton(
|
|
width: 28,
|
|
width: 28,
|
|
onPressed: () => context.read<MenuBloc>().add(const MenuEvent.collapse()),
|
|
onPressed: () => context.read<MenuBloc>().add(const MenuEvent.collapse()),
|
|
iconPadding: const EdgeInsets.fromLTRB(4, 4, 4, 4),
|
|
iconPadding: const EdgeInsets.fromLTRB(4, 4, 4, 4),
|
|
- icon: svg("home/hide_menu"),
|
|
|
|
|
|
+ icon: svg("home/hide_menu", color: theme.textColor),
|
|
)
|
|
)
|
|
],
|
|
],
|
|
),
|
|
),
|