2020-10-13 21:40:22 +00:00
|
|
|
import 'dart:async';
|
2022-04-23 06:29:46 +00:00
|
|
|
import 'dart:math';
|
2020-10-13 21:40:22 +00:00
|
|
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/widgets.dart';
|
2021-04-06 00:35:27 +00:00
|
|
|
import 'package:fluttertoast/fluttertoast.dart';
|
2020-10-13 21:40:22 +00:00
|
|
|
import 'package:logging/logging.dart';
|
2020-10-28 15:25:32 +00:00
|
|
|
import 'package:photos/core/configuration.dart';
|
2020-10-13 21:40:22 +00:00
|
|
|
import 'package:photos/core/event_bus.dart';
|
2022-05-03 03:48:37 +00:00
|
|
|
import 'package:photos/ente_theme_data.dart';
|
2020-10-31 17:59:47 +00:00
|
|
|
import 'package:photos/events/collection_updated_event.dart';
|
2021-05-04 15:26:17 +00:00
|
|
|
import 'package:photos/events/local_photos_updated_event.dart';
|
2021-04-06 00:35:27 +00:00
|
|
|
import 'package:photos/events/tab_changed_event.dart';
|
2021-03-17 21:07:17 +00:00
|
|
|
import 'package:photos/events/user_logged_out_event.dart';
|
2020-10-29 00:30:02 +00:00
|
|
|
import 'package:photos/models/collection_items.dart';
|
2022-05-08 04:34:55 +00:00
|
|
|
import 'package:photos/models/galleryType.dart';
|
2021-02-08 09:31:02 +00:00
|
|
|
import 'package:photos/services/collections_service.dart';
|
2020-11-02 14:38:59 +00:00
|
|
|
import 'package:photos/ui/collection_page.dart';
|
|
|
|
import 'package:photos/ui/collections_gallery_widget.dart';
|
2022-05-03 03:48:37 +00:00
|
|
|
import 'package:photos/ui/common/gradientButton.dart';
|
2020-10-13 21:40:22 +00:00
|
|
|
import 'package:photos/ui/loading_widget.dart';
|
|
|
|
import 'package:photos/ui/thumbnail_widget.dart';
|
2021-05-08 18:14:18 +00:00
|
|
|
import 'package:photos/utils/navigation_util.dart';
|
2021-04-06 00:35:27 +00:00
|
|
|
import 'package:photos/utils/share_util.dart';
|
|
|
|
import 'package:photos/utils/toast_util.dart';
|
2020-10-13 21:40:22 +00:00
|
|
|
|
|
|
|
class SharedCollectionGallery extends StatefulWidget {
|
|
|
|
const SharedCollectionGallery({Key key}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
_SharedCollectionGalleryState createState() =>
|
|
|
|
_SharedCollectionGalleryState();
|
|
|
|
}
|
|
|
|
|
2020-11-10 11:36:51 +00:00
|
|
|
class _SharedCollectionGalleryState extends State<SharedCollectionGallery>
|
|
|
|
with AutomaticKeepAliveClientMixin {
|
2021-10-30 06:18:45 +00:00
|
|
|
final Logger _logger = Logger("SharedCollectionGallery");
|
2021-05-04 15:26:17 +00:00
|
|
|
StreamSubscription<LocalPhotosUpdatedEvent> _localFilesSubscription;
|
|
|
|
StreamSubscription<CollectionUpdatedEvent> _collectionUpdatesSubscription;
|
2021-03-17 21:07:17 +00:00
|
|
|
StreamSubscription<UserLoggedOutEvent> _loggedOutEvent;
|
2020-10-13 21:40:22 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
void initState() {
|
2021-05-04 15:26:17 +00:00
|
|
|
_localFilesSubscription =
|
|
|
|
Bus.instance.on<LocalPhotosUpdatedEvent>().listen((event) {
|
|
|
|
_logger.info("Files updated");
|
|
|
|
setState(() {});
|
|
|
|
});
|
|
|
|
_collectionUpdatesSubscription =
|
|
|
|
Bus.instance.on<CollectionUpdatedEvent>().listen((event) {
|
2020-10-31 17:59:47 +00:00
|
|
|
setState(() {});
|
2020-10-13 21:40:22 +00:00
|
|
|
});
|
2021-03-17 21:07:17 +00:00
|
|
|
_loggedOutEvent = Bus.instance.on<UserLoggedOutEvent>().listen((event) {
|
|
|
|
setState(() {});
|
|
|
|
});
|
2020-10-13 21:40:22 +00:00
|
|
|
super.initState();
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2020-11-30 08:57:11 +00:00
|
|
|
super.build(context);
|
2020-11-02 14:38:59 +00:00
|
|
|
return FutureBuilder<SharedCollections>(
|
2021-05-08 18:05:51 +00:00
|
|
|
future:
|
|
|
|
Future.value(CollectionsService.instance.getLatestCollectionFiles())
|
|
|
|
.then((files) async {
|
2021-04-19 18:00:15 +00:00
|
|
|
final List<CollectionWithThumbnail> outgoing = [];
|
|
|
|
final List<CollectionWithThumbnail> incoming = [];
|
|
|
|
for (final file in files) {
|
|
|
|
final c =
|
|
|
|
CollectionsService.instance.getCollectionByID(file.collectionID);
|
|
|
|
if (c.owner.id == Configuration.instance.getUserID()) {
|
2022-01-24 11:24:25 +00:00
|
|
|
if (c.sharees.isNotEmpty || c.publicURLs.isNotEmpty) {
|
2021-04-19 18:00:15 +00:00
|
|
|
outgoing.add(
|
|
|
|
CollectionWithThumbnail(
|
|
|
|
c,
|
|
|
|
file,
|
|
|
|
),
|
|
|
|
);
|
2020-11-02 14:38:59 +00:00
|
|
|
}
|
|
|
|
} else {
|
2021-04-19 18:00:15 +00:00
|
|
|
incoming.add(
|
|
|
|
CollectionWithThumbnail(
|
|
|
|
c,
|
|
|
|
file,
|
|
|
|
),
|
|
|
|
);
|
2020-10-13 21:40:22 +00:00
|
|
|
}
|
|
|
|
}
|
2020-11-02 14:38:59 +00:00
|
|
|
outgoing.sort((first, second) {
|
2021-05-04 15:26:17 +00:00
|
|
|
return second.collection.updationTime
|
|
|
|
.compareTo(first.collection.updationTime);
|
2020-11-02 14:38:59 +00:00
|
|
|
});
|
|
|
|
incoming.sort((first, second) {
|
2021-05-04 15:26:17 +00:00
|
|
|
return second.collection.updationTime
|
|
|
|
.compareTo(first.collection.updationTime);
|
2020-10-29 00:50:39 +00:00
|
|
|
});
|
2020-11-02 14:38:59 +00:00
|
|
|
return SharedCollections(outgoing, incoming);
|
2020-10-13 21:40:22 +00:00
|
|
|
}),
|
|
|
|
builder: (context, snapshot) {
|
|
|
|
if (snapshot.hasData) {
|
2020-11-02 14:38:59 +00:00
|
|
|
return _getSharedCollectionsGallery(snapshot.data);
|
2020-10-13 21:40:22 +00:00
|
|
|
} else if (snapshot.hasError) {
|
|
|
|
_logger.shout(snapshot.error);
|
|
|
|
return Center(child: Text(snapshot.error.toString()));
|
|
|
|
} else {
|
|
|
|
return loadWidget;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2020-11-02 14:38:59 +00:00
|
|
|
Widget _getSharedCollectionsGallery(SharedCollections collections) {
|
2022-04-23 06:29:46 +00:00
|
|
|
Size size = MediaQuery.of(context).size;
|
2022-05-03 03:48:37 +00:00
|
|
|
int albumsCountInOneRow = max(size.width ~/ 220.0, 2);
|
2020-11-02 14:38:59 +00:00
|
|
|
return SingleChildScrollView(
|
2021-02-08 09:26:49 +00:00
|
|
|
child: Container(
|
|
|
|
margin: const EdgeInsets.only(bottom: 50),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Padding(padding: EdgeInsets.all(6)),
|
2022-05-03 03:48:37 +00:00
|
|
|
SectionTitle("Incoming"),
|
2021-02-08 09:26:49 +00:00
|
|
|
Padding(padding: EdgeInsets.all(16)),
|
2021-09-05 06:27:31 +00:00
|
|
|
collections.incoming.isNotEmpty
|
2021-02-08 09:26:49 +00:00
|
|
|
? GridView.builder(
|
2020-12-12 01:11:12 +00:00
|
|
|
shrinkWrap: true,
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
itemBuilder: (context, index) {
|
2021-04-27 15:35:03 +00:00
|
|
|
return IncomingCollectionItem(
|
|
|
|
collections.incoming[index]);
|
2020-12-12 01:11:12 +00:00
|
|
|
},
|
2021-02-08 09:26:49 +00:00
|
|
|
itemCount: collections.incoming.length,
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
2022-04-23 06:29:46 +00:00
|
|
|
crossAxisCount: albumsCountInOneRow,
|
2021-02-08 09:26:49 +00:00
|
|
|
),
|
|
|
|
)
|
2021-04-06 00:35:27 +00:00
|
|
|
: _getIncomingCollectionEmptyState(),
|
2021-02-08 09:26:49 +00:00
|
|
|
Padding(padding: EdgeInsets.all(16)),
|
|
|
|
Divider(height: 0),
|
|
|
|
Padding(padding: EdgeInsets.all(14)),
|
2022-05-03 03:48:37 +00:00
|
|
|
SectionTitle("Outgoing"),
|
2021-02-08 09:26:49 +00:00
|
|
|
Padding(padding: EdgeInsets.all(16)),
|
2021-09-05 06:27:31 +00:00
|
|
|
collections.outgoing.isNotEmpty
|
2021-02-08 09:26:49 +00:00
|
|
|
? Padding(
|
|
|
|
padding: const EdgeInsets.fromLTRB(12, 0, 0, 0),
|
|
|
|
child: ListView.builder(
|
|
|
|
shrinkWrap: true,
|
|
|
|
padding: EdgeInsets.only(bottom: 12),
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
itemBuilder: (context, index) {
|
2021-04-27 15:35:03 +00:00
|
|
|
return OutgoingCollectionItem(
|
|
|
|
collections.outgoing[index]);
|
2021-02-08 09:26:49 +00:00
|
|
|
},
|
|
|
|
itemCount: collections.outgoing.length,
|
|
|
|
),
|
|
|
|
)
|
2021-04-06 00:35:27 +00:00
|
|
|
: _getOutgoingCollectionEmptyState(),
|
2021-02-08 09:26:49 +00:00
|
|
|
],
|
|
|
|
),
|
2020-11-02 14:38:59 +00:00
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2021-04-27 15:35:03 +00:00
|
|
|
Widget _getIncomingCollectionEmptyState() {
|
|
|
|
return Container(
|
|
|
|
padding: EdgeInsets.only(top: 10),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Text(
|
2022-05-03 03:48:37 +00:00
|
|
|
"No one is sharing with you",
|
2022-03-05 20:52:00 +00:00
|
|
|
style: TextStyle(
|
|
|
|
color:
|
|
|
|
Theme.of(context).colorScheme.onSurface.withOpacity(0.6)),
|
2021-04-27 15:35:03 +00:00
|
|
|
),
|
|
|
|
Container(
|
2022-05-03 03:48:37 +00:00
|
|
|
padding: EdgeInsets.symmetric(vertical: 12, horizontal: 72),
|
|
|
|
child: GradientButton(
|
2021-04-27 15:35:03 +00:00
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
2022-05-03 03:48:37 +00:00
|
|
|
//mainAxisSize: MainAxisSize.min,
|
2021-04-27 15:35:03 +00:00
|
|
|
children: [
|
|
|
|
Icon(
|
|
|
|
Icons.outgoing_mail,
|
2022-05-03 03:48:37 +00:00
|
|
|
color: Colors.white,
|
2021-04-27 15:35:03 +00:00
|
|
|
),
|
2022-05-03 03:48:37 +00:00
|
|
|
Padding(padding: EdgeInsets.all(2)),
|
2021-04-27 15:35:03 +00:00
|
|
|
Text(
|
2022-05-03 03:48:37 +00:00
|
|
|
"Invite",
|
|
|
|
style: gradientButtonTextTheme(),
|
2021-04-27 15:35:03 +00:00
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
2022-05-03 03:48:37 +00:00
|
|
|
linearGradientColors: const [
|
|
|
|
Color(0xFF2CD267),
|
|
|
|
Color(0xFF1DB954),
|
|
|
|
],
|
|
|
|
onTap: () async {
|
2021-04-27 15:35:03 +00:00
|
|
|
shareText("Check out https://ente.io");
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget _getOutgoingCollectionEmptyState() {
|
|
|
|
return Container(
|
|
|
|
padding: EdgeInsets.only(top: 10),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Text(
|
2022-05-03 03:48:37 +00:00
|
|
|
"You aren't sharing anything",
|
2022-03-05 20:52:00 +00:00
|
|
|
style: TextStyle(
|
|
|
|
color:
|
|
|
|
Theme.of(context).colorScheme.onSurface.withOpacity(0.6)),
|
2021-04-27 15:35:03 +00:00
|
|
|
),
|
|
|
|
Container(
|
2022-05-03 03:48:37 +00:00
|
|
|
padding: EdgeInsets.symmetric(vertical: 12, horizontal: 72),
|
|
|
|
child: GradientButton(
|
2021-04-27 15:35:03 +00:00
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
children: [
|
|
|
|
Icon(
|
|
|
|
Icons.person_add,
|
2022-05-03 03:48:37 +00:00
|
|
|
color: Colors.white,
|
2021-04-27 15:35:03 +00:00
|
|
|
),
|
2022-05-03 03:48:37 +00:00
|
|
|
Padding(padding: EdgeInsets.all(2)),
|
2021-04-27 15:35:03 +00:00
|
|
|
Text(
|
2022-05-03 03:48:37 +00:00
|
|
|
"Share",
|
|
|
|
style: gradientButtonTextTheme(),
|
2021-04-27 15:35:03 +00:00
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
2022-05-03 03:48:37 +00:00
|
|
|
linearGradientColors: const [
|
|
|
|
Color(0xFF2CD267),
|
|
|
|
Color(0xFF1DB954),
|
|
|
|
],
|
|
|
|
onTap: () async {
|
2021-04-27 15:35:03 +00:00
|
|
|
await showToast("select an album on ente to share",
|
|
|
|
toastLength: Toast.LENGTH_LONG);
|
|
|
|
Bus.instance.fire(
|
|
|
|
TabChangedEvent(1, TabChangedEventSource.collections_page));
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
void dispose() {
|
2021-05-04 15:26:17 +00:00
|
|
|
_localFilesSubscription.cancel();
|
|
|
|
_collectionUpdatesSubscription.cancel();
|
2021-04-27 15:35:03 +00:00
|
|
|
_loggedOutEvent.cancel();
|
|
|
|
super.dispose();
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
bool get wantKeepAlive => true;
|
|
|
|
}
|
|
|
|
|
|
|
|
class OutgoingCollectionItem extends StatelessWidget {
|
|
|
|
final CollectionWithThumbnail c;
|
|
|
|
|
|
|
|
const OutgoingCollectionItem(
|
|
|
|
this.c, {
|
|
|
|
Key key,
|
|
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2021-09-05 09:27:07 +00:00
|
|
|
final sharees = <String>[];
|
2020-12-07 17:32:35 +00:00
|
|
|
for (int index = 0; index < c.collection.sharees.length; index++) {
|
2022-01-24 18:16:07 +00:00
|
|
|
final sharee = c.collection.sharees[index];
|
2022-02-07 19:03:22 +00:00
|
|
|
final name =
|
|
|
|
(sharee.name?.isNotEmpty ?? false) ? sharee.name : sharee.email;
|
2020-12-07 17:32:35 +00:00
|
|
|
if (index < 2) {
|
2022-01-24 18:16:07 +00:00
|
|
|
sharees.add(name);
|
2020-12-07 17:32:35 +00:00
|
|
|
} else {
|
|
|
|
final remaining = c.collection.sharees.length - index;
|
|
|
|
if (remaining == 1) {
|
|
|
|
// If it's the last sharee
|
2022-01-24 18:16:07 +00:00
|
|
|
sharees.add(name);
|
2020-12-07 17:32:35 +00:00
|
|
|
} else {
|
|
|
|
sharees.add("and " +
|
|
|
|
remaining.toString() +
|
|
|
|
" other" +
|
|
|
|
(remaining > 1 ? "s" : ""));
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2020-11-02 14:38:59 +00:00
|
|
|
return GestureDetector(
|
2021-02-08 14:54:26 +00:00
|
|
|
behavior: HitTestBehavior.opaque,
|
2020-11-02 14:38:59 +00:00
|
|
|
child: Container(
|
2020-12-12 01:11:12 +00:00
|
|
|
margin: EdgeInsets.fromLTRB(16, 12, 8, 12),
|
2020-11-02 14:38:59 +00:00
|
|
|
child: Row(
|
|
|
|
children: <Widget>[
|
|
|
|
ClipRRect(
|
2020-12-12 01:11:12 +00:00
|
|
|
borderRadius: BorderRadius.circular(8.0),
|
2022-01-24 18:16:07 +00:00
|
|
|
child: SizedBox(
|
2020-11-02 14:38:59 +00:00
|
|
|
child: Hero(
|
|
|
|
tag: "outgoing_collection" + c.thumbnail.tag(),
|
|
|
|
child: ThumbnailWidget(
|
|
|
|
c.thumbnail,
|
2021-05-08 18:05:51 +00:00
|
|
|
key: Key("outgoing_collection" + c.thumbnail.tag()),
|
2020-11-02 14:38:59 +00:00
|
|
|
)),
|
|
|
|
height: 60,
|
|
|
|
width: 60,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Padding(padding: EdgeInsets.all(8)),
|
2022-02-07 19:11:28 +00:00
|
|
|
Expanded(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
c.collection.name,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 16,
|
|
|
|
),
|
2022-01-24 18:23:46 +00:00
|
|
|
),
|
2022-02-07 19:11:28 +00:00
|
|
|
Padding(padding: EdgeInsets.all(2)),
|
|
|
|
c.collection.publicURLs.isEmpty
|
|
|
|
? Container()
|
|
|
|
: Icon(Icons.link),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
sharees.isEmpty
|
|
|
|
? Container()
|
|
|
|
: Padding(
|
|
|
|
padding: EdgeInsets.fromLTRB(0, 4, 0, 0),
|
|
|
|
child: Text(
|
|
|
|
"shared with " + sharees.join(", "),
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 14,
|
|
|
|
color: Theme.of(context).primaryColorLight,
|
|
|
|
),
|
|
|
|
textAlign: TextAlign.left,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
2022-01-24 18:18:33 +00:00
|
|
|
),
|
|
|
|
),
|
2022-02-07 19:11:28 +00:00
|
|
|
],
|
|
|
|
),
|
2020-11-02 14:38:59 +00:00
|
|
|
),
|
|
|
|
],
|
2020-10-13 21:40:22 +00:00
|
|
|
),
|
|
|
|
),
|
2020-11-02 14:38:59 +00:00
|
|
|
onTap: () {
|
|
|
|
final page = CollectionPage(
|
2021-05-13 18:05:32 +00:00
|
|
|
c,
|
2022-05-08 04:34:55 +00:00
|
|
|
appBarType: GalleryType.owned_collection,
|
2020-11-02 14:38:59 +00:00
|
|
|
tagPrefix: "outgoing_collection",
|
|
|
|
);
|
2021-05-08 18:14:18 +00:00
|
|
|
routeToPage(context, page);
|
2020-11-02 14:38:59 +00:00
|
|
|
},
|
2020-10-13 21:40:22 +00:00
|
|
|
);
|
|
|
|
}
|
2021-04-27 15:35:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class IncomingCollectionItem extends StatelessWidget {
|
|
|
|
final CollectionWithThumbnail c;
|
2020-10-13 21:40:22 +00:00
|
|
|
|
2021-04-27 15:35:03 +00:00
|
|
|
const IncomingCollectionItem(
|
|
|
|
this.c, {
|
|
|
|
Key key,
|
|
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2020-10-13 21:40:22 +00:00
|
|
|
return GestureDetector(
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
2020-10-26 10:25:23 +00:00
|
|
|
ClipRRect(
|
2020-12-12 01:11:12 +00:00
|
|
|
borderRadius: BorderRadius.circular(18.0),
|
2020-10-26 10:25:23 +00:00
|
|
|
child: Container(
|
2020-10-30 16:03:13 +00:00
|
|
|
child: Stack(
|
|
|
|
children: [
|
|
|
|
Hero(
|
2020-10-26 10:25:23 +00:00
|
|
|
tag: "shared_collection" + c.thumbnail.tag(),
|
2021-05-08 18:05:51 +00:00
|
|
|
child: ThumbnailWidget(
|
|
|
|
c.thumbnail,
|
|
|
|
key: Key("shared_collection" + c.thumbnail.tag()),
|
|
|
|
)),
|
2020-10-30 16:03:13 +00:00
|
|
|
Align(
|
|
|
|
alignment: Alignment.bottomRight,
|
|
|
|
child: Container(
|
|
|
|
child: Text(
|
2020-11-09 12:44:00 +00:00
|
|
|
c.collection.owner.name == null ||
|
|
|
|
c.collection.owner.name.isEmpty
|
|
|
|
? c.collection.owner.email.substring(0, 1)
|
|
|
|
: c.collection.owner.name.substring(0, 1),
|
2020-10-30 16:03:13 +00:00
|
|
|
textAlign: TextAlign.center,
|
|
|
|
),
|
|
|
|
padding: EdgeInsets.all(8),
|
|
|
|
margin: EdgeInsets.fromLTRB(0, 0, 4, 0),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
shape: BoxShape.circle,
|
2021-05-12 15:59:07 +00:00
|
|
|
color: Theme.of(context).buttonColor,
|
2020-10-30 16:03:13 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
2020-12-12 01:11:12 +00:00
|
|
|
height: 160,
|
|
|
|
width: 160,
|
2020-10-26 10:25:23 +00:00
|
|
|
),
|
2020-10-13 21:40:22 +00:00
|
|
|
),
|
|
|
|
Padding(padding: EdgeInsets.all(2)),
|
|
|
|
Expanded(
|
2020-11-10 16:19:06 +00:00
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.fromLTRB(8, 0, 8, 0),
|
|
|
|
child: Text(
|
|
|
|
c.collection.name,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 16,
|
|
|
|
),
|
|
|
|
overflow: TextOverflow.ellipsis,
|
2020-10-13 21:40:22 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
onTap: () {
|
2021-09-10 17:57:41 +00:00
|
|
|
routeToPage(
|
|
|
|
context,
|
|
|
|
CollectionPage(c,
|
2022-05-08 04:34:55 +00:00
|
|
|
appBarType: GalleryType.shared_collection,
|
2021-09-10 17:57:41 +00:00
|
|
|
tagPrefix: "shared_collection"));
|
2020-10-13 21:40:22 +00:00
|
|
|
},
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|