Skip to content

Commit

Permalink
Move top bar widget to common
Browse files Browse the repository at this point in the history
  • Loading branch information
eshfield committed Jun 24, 2024
1 parent af77608 commit cc5e775
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/presentation/add_task_screen/add_task_screen.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:app/domain/models/task.dart';
import 'package:app/l10n/l10n_extension.dart';
import 'package:app/presentation/home_screen/widgets/top_bar.dart';
import 'package:app/presentation/widgets/app_top_bar.dart';
import 'package:app/presentation/theme/app_theme_extensions.dart';
import 'package:app/presentation/widgets/app_date_picker.dart';
import 'package:app/presentation/widgets/app_dropdown_menu.dart';
Expand Down Expand Up @@ -133,7 +133,7 @@ class _TopBar extends StatelessWidget {

@override
Widget build(BuildContext context) {
return TopBar(
return AppTopBar(
leading: IconButton(
onPressed: () => Navigator.of(context).pop(),
icon: Icon(
Expand Down
4 changes: 2 additions & 2 deletions lib/presentation/home_screen/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:app/presentation/add_task_screen/add_task_screen.dart';
import 'package:app/presentation/home_screen/widgets/done_tasks_visibility_button.dart';
import 'package:app/presentation/home_screen/widgets/header.dart';
import 'package:app/presentation/home_screen/widgets/task_list.dart';
import 'package:app/presentation/home_screen/widgets/top_bar.dart';
import 'package:app/presentation/widgets/app_top_bar.dart';
import 'package:app/presentation/theme/app_theme_extensions.dart';
import 'package:flutter/material.dart';

Expand Down Expand Up @@ -244,7 +244,7 @@ class _TopBar extends StatelessWidget {
opacity: showAppBar ? 1 : 0,
curve: curve,
duration: appTopBarAnimationDuration,
child: TopBar(
child: AppTopBar(
title: context.l10n.appTitle,
trailing: const Padding(
padding: EdgeInsets.only(right: 16),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import 'package:flutter/material.dart';

const buttonPadding = 16.0 - (48.0 - 24.0) / 2;

class TopBar extends StatelessWidget {
class AppTopBar extends StatelessWidget {
final Widget? leading;
final String? title;
final Widget? trailing;

const TopBar({
const AppTopBar({
super.key,
this.leading,
this.title,
Expand Down

0 comments on commit cc5e775

Please sign in to comment.