2022-04-23 19:08:45 -07:00
|
|
|
import 'package:auto_route/auto_route.dart';
|
2022-07-07 11:40:54 -07:00
|
|
|
import 'package:easy_localization/easy_localization.dart';
|
2022-04-23 19:08:45 -07:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:immich_mobile/routing/router.dart';
|
|
|
|
|
|
|
|
class SharingSliverAppBar extends StatelessWidget {
|
|
|
|
const SharingSliverAppBar({
|
|
|
|
Key? key,
|
|
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return SliverAppBar(
|
|
|
|
centerTitle: true,
|
|
|
|
floating: false,
|
|
|
|
pinned: true,
|
|
|
|
snap: false,
|
2022-06-30 18:08:49 -07:00
|
|
|
automaticallyImplyLeading: false,
|
2022-04-23 19:08:45 -07:00
|
|
|
title: Text(
|
|
|
|
'IMMICH',
|
|
|
|
style: TextStyle(
|
|
|
|
fontFamily: 'SnowburstOne',
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: 22,
|
|
|
|
color: Theme.of(context).primaryColor,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
bottom: PreferredSize(
|
|
|
|
preferredSize: const Size.fromHeight(50.0),
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 12.0),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.only(right: 4.0),
|
2022-08-15 16:53:30 -07:00
|
|
|
child: ElevatedButton.icon(
|
2022-04-23 19:08:45 -07:00
|
|
|
onPressed: () {
|
2022-06-25 13:12:47 -07:00
|
|
|
AutoRouter.of(context)
|
2022-08-02 22:04:34 -07:00
|
|
|
.push(CreateAlbumRoute(isSharedAlbum: true));
|
2022-04-23 19:08:45 -07:00
|
|
|
},
|
|
|
|
icon: const Icon(
|
|
|
|
Icons.photo_album_outlined,
|
|
|
|
size: 20,
|
|
|
|
),
|
|
|
|
label: const Text(
|
2022-07-07 11:40:54 -07:00
|
|
|
"sharing_silver_appbar_create_shared_album",
|
2022-08-15 16:53:30 -07:00
|
|
|
maxLines: 1,
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: 11,
|
|
|
|
// color: Theme.of(context).primaryColor,
|
|
|
|
),
|
2022-07-07 11:40:54 -07:00
|
|
|
).tr(),
|
2022-04-23 19:08:45 -07:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.only(left: 4.0),
|
2022-08-15 16:53:30 -07:00
|
|
|
child: ElevatedButton.icon(
|
2022-04-23 19:08:45 -07:00
|
|
|
onPressed: null,
|
|
|
|
icon: const Icon(
|
|
|
|
Icons.swap_horizontal_circle_outlined,
|
|
|
|
size: 20,
|
|
|
|
),
|
|
|
|
label: const Text(
|
2022-07-07 11:40:54 -07:00
|
|
|
"sharing_silver_appbar_share_partner",
|
2022-08-15 16:53:30 -07:00
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: 11,
|
|
|
|
),
|
|
|
|
maxLines: 1,
|
2022-07-07 11:40:54 -07:00
|
|
|
).tr(),
|
2022-04-23 19:08:45 -07:00
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|