2022-04-24 04:08:45 +02:00
|
|
|
import 'package:auto_route/auto_route.dart';
|
|
|
|
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-07-01 03:08:49 +02:00
|
|
|
automaticallyImplyLeading: false,
|
|
|
|
// leading: Container(),
|
2022-04-24 04:08:45 +02:00
|
|
|
// elevation: 0,
|
|
|
|
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),
|
|
|
|
child: TextButton.icon(
|
|
|
|
style: ButtonStyle(
|
2022-06-25 22:12:47 +02:00
|
|
|
backgroundColor: MaterialStateProperty.all(
|
|
|
|
Theme.of(context).primaryColor.withAlpha(20)),
|
2022-04-24 04:08:45 +02:00
|
|
|
// foregroundColor: MaterialStateProperty.all(Colors.white),
|
|
|
|
),
|
|
|
|
onPressed: () {
|
2022-06-25 22:12:47 +02:00
|
|
|
AutoRouter.of(context)
|
|
|
|
.push(const CreateSharedAlbumRoute());
|
2022-04-24 04:08:45 +02:00
|
|
|
},
|
|
|
|
icon: const Icon(
|
|
|
|
Icons.photo_album_outlined,
|
|
|
|
size: 20,
|
|
|
|
),
|
|
|
|
label: const Text(
|
|
|
|
"Create shared album",
|
2022-06-25 22:12:47 +02:00
|
|
|
style:
|
|
|
|
TextStyle(fontWeight: FontWeight.bold, fontSize: 12),
|
2022-04-24 04:08:45 +02:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.only(left: 4.0),
|
|
|
|
child: TextButton.icon(
|
|
|
|
style: ButtonStyle(
|
2022-06-25 22:12:47 +02:00
|
|
|
backgroundColor: MaterialStateProperty.all(
|
|
|
|
Theme.of(context).primaryColor.withAlpha(20)),
|
2022-04-24 04:08:45 +02:00
|
|
|
// foregroundColor: MaterialStateProperty.all(Colors.white),
|
|
|
|
),
|
|
|
|
onPressed: null,
|
|
|
|
icon: const Icon(
|
|
|
|
Icons.swap_horizontal_circle_outlined,
|
|
|
|
size: 20,
|
|
|
|
),
|
|
|
|
label: const Text(
|
|
|
|
"Share with partner",
|
2022-06-25 22:12:47 +02:00
|
|
|
style:
|
|
|
|
TextStyle(fontWeight: FontWeight.bold, fontSize: 12),
|
2022-04-24 04:08:45 +02:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|