mirror of https://github.com/flutter/samples.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.4 KiB
49 lines
1.4 KiB
// Copyright 2024 The Flutter team. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
|
|
import '../../../routing/routes.dart';
|
|
import '../../core/localization/applocalization.dart';
|
|
import '../../core/themes/dimens.dart';
|
|
import '../../core/ui/back_button.dart';
|
|
import '../../core/ui/home_button.dart';
|
|
|
|
class ActivitiesHeader extends StatelessWidget {
|
|
const ActivitiesHeader({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SafeArea(
|
|
top: true,
|
|
bottom: false,
|
|
child: Padding(
|
|
padding: EdgeInsets.only(
|
|
left: Dimens.of(context).paddingScreenHorizontal,
|
|
right: Dimens.of(context).paddingScreenHorizontal,
|
|
top: Dimens.of(context).paddingScreenVertical,
|
|
bottom: Dimens.paddingVertical,
|
|
),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
CustomBackButton(
|
|
onTap: () {
|
|
// Navigate to ResultsScreen and edit search
|
|
context.go(Routes.results);
|
|
},
|
|
),
|
|
Text(
|
|
AppLocalization.of(context).activities,
|
|
style: Theme.of(context).textTheme.titleLarge,
|
|
),
|
|
const HomeButton(),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|