2022-07-03 05:57:27 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:photos/ente_theme_data.dart';
|
2023-04-07 05:27:06 +00:00
|
|
|
import "package:photos/generated/l10n.dart";
|
2022-07-03 05:57:27 +00:00
|
|
|
|
|
|
|
class EmptyState extends StatelessWidget {
|
2023-04-07 05:27:06 +00:00
|
|
|
final String? text;
|
2022-07-03 05:57:27 +00:00
|
|
|
|
2023-04-07 05:27:06 +00:00
|
|
|
const EmptyState({Key? key, this.text}) : super(key: key);
|
2022-07-03 05:57:27 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Center(
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
child: Text(
|
2023-04-07 05:27:06 +00:00
|
|
|
text ?? S.of(context).nothingToSeeHere,
|
2022-11-02 06:07:05 +00:00
|
|
|
textAlign: TextAlign.center,
|
2022-07-03 05:57:27 +00:00
|
|
|
style: TextStyle(
|
|
|
|
color: Theme.of(context)
|
|
|
|
.colorScheme
|
|
|
|
.defaultTextColor
|
|
|
|
.withOpacity(0.35),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|