[mob][photos] Floating button background color fixed

This commit is contained in:
Aman Raj Singh Mourya
2024-09-03 17:16:11 +05:30
parent 9b0d11963c
commit db1eb19ef0
3 changed files with 47 additions and 50 deletions

View File

@@ -10,6 +10,7 @@ import 'package:photos/events/user_logged_out_event.dart';
import "package:photos/generated/l10n.dart";
import 'package:photos/models/collection/collection_items.dart';
import 'package:photos/services/collections_service.dart';
import "package:photos/theme/ente_theme.dart";
import "package:photos/ui/collections/album/row_item.dart";
import "package:photos/ui/collections/collection_list_page.dart";
import 'package:photos/ui/common/loading_widget.dart';
@@ -319,6 +320,7 @@ class _SharedCollectionsTabState extends State<SharedCollectionsTab>
],
)
: const SizedBox.shrink(),
Divider(color: getEnteColorScheme(context).strokeFaint),
const CollectPhotosCardWidget(),
const SizedBox(height: 32),
],

View File

@@ -91,56 +91,52 @@ class _EmptyAlbumStateNewState extends State<CollectPhotosBottomButtons> {
crossFadeState: !_hasSelectedFilesNotifier.value
? CrossFadeState.showFirst
: CrossFadeState.showSecond,
firstChild: Stack(
children: [
Align(
alignment: Alignment.bottomCenter,
child: Padding(
padding: const EdgeInsets.fromLTRB(24, 0, 24, 12),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
decoration: BoxDecoration(
color:
getEnteColorScheme(context).backgroundElevated2,
borderRadius:
const BorderRadius.all(Radius.circular(4)),
),
child: ButtonWidget(
buttonType: ButtonType.secondary,
buttonSize: ButtonSize.large,
labelText: S.of(context).addPhotos,
icon: Icons.add_photo_alternate_outlined,
shouldSurfaceExecutionStates: false,
onTap: () async {
try {
await showAddPhotosSheet(context, widget.c);
} catch (e) {
await showGenericErrorDialog(
context: context,
error: e,
);
}
},
),
),
const SizedBox(height: 10),
ButtonWidget(
buttonType: ButtonType.primary,
buttonSize: ButtonSize.large,
labelText: S.of(context).share,
icon: Icons.adaptive.share,
shouldSurfaceExecutionStates: false,
onTap: () async {
await _generateAlbumUrl();
},
),
],
firstChild: Container(
decoration: BoxDecoration(
color: getEnteColorScheme(context).backgroundElevated,
),
child: Padding(
padding: const EdgeInsets.fromLTRB(24, 12, 24, 12),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
decoration: BoxDecoration(
color: getEnteColorScheme(context).backgroundElevated2,
borderRadius: const BorderRadius.all(Radius.circular(4)),
),
child: ButtonWidget(
buttonType: ButtonType.secondary,
buttonSize: ButtonSize.large,
labelText: S.of(context).addPhotos,
icon: Icons.add_photo_alternate_outlined,
shouldSurfaceExecutionStates: false,
onTap: () async {
try {
await showAddPhotosSheet(context, widget.c);
} catch (e) {
await showGenericErrorDialog(
context: context,
error: e,
);
}
},
),
),
),
const SizedBox(height: 8),
ButtonWidget(
buttonType: ButtonType.primary,
buttonSize: ButtonSize.large,
labelText: S.of(context).share,
icon: Icons.adaptive.share,
shouldSurfaceExecutionStates: false,
onTap: () async {
await _generateAlbumUrl();
},
),
],
),
],
),
),
secondChild: const SizedBox.shrink(),
);

View File

@@ -109,13 +109,12 @@ class CollectionPage extends StatelessWidget {
isFromCollectPhotos: isFromCollectPhotos,
),
),
floatingActionButton: isFromCollectPhotos
bottomNavigationBar: isFromCollectPhotos
? CollectPhotosBottomButtons(
c.collection,
selectedFiles: _selectedFiles,
)
: const SizedBox.shrink(),
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
body: SelectionState(
selectedFiles: _selectedFiles,
child: Stack(