|
@@ -18,10 +18,20 @@ class LoadingPhotosWidget extends StatefulWidget {
|
|
|
|
|
|
class _LoadingPhotosWidgetState extends State<LoadingPhotosWidget> {
|
|
|
StreamSubscription<SyncStatusUpdate> _firstImportEvent;
|
|
|
- // final int _currentPage = 0;
|
|
|
- // final PageController _pageController = PageController(
|
|
|
- // initialPage: 0,
|
|
|
- // );
|
|
|
+ int _currentPage = 0;
|
|
|
+ final PageController _pageController = PageController(
|
|
|
+ initialPage: 0,
|
|
|
+ );
|
|
|
+ final List<String> _messages = [
|
|
|
+ "web.ente.io has a slick uploader",
|
|
|
+ "We have preserved over a million memories so far",
|
|
|
+ "All our apps are open source",
|
|
|
+ "Our encryption protocols have been reviewed by engineers at Google, Apple, Amazon, and Facebook",
|
|
|
+ "You can share files and folders with your loved ones, end-to-end encrypted",
|
|
|
+ "Our mobile apps run in the background to encrypt and backup new photos you take",
|
|
|
+ "We use Xchacha20Poly1305 to safely encrypt your data",
|
|
|
+ "One of our data centers is in a fall out shelter 25m underground",
|
|
|
+ ];
|
|
|
|
|
|
@override
|
|
|
void initState() {
|
|
@@ -42,6 +52,22 @@ class _LoadingPhotosWidgetState extends State<LoadingPhotosWidget> {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
+ Timer.periodic(Duration(seconds: 5), (Timer timer) {
|
|
|
+ if (!mounted) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (_currentPage < _messages.length - 1) {
|
|
|
+ _currentPage++;
|
|
|
+ } else {
|
|
|
+ _currentPage = 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ _pageController.animateToPage(
|
|
|
+ _currentPage,
|
|
|
+ duration: Duration(milliseconds: 300),
|
|
|
+ curve: Curves.easeIn,
|
|
|
+ );
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
@override
|
|
@@ -64,19 +90,28 @@ class _LoadingPhotosWidgetState extends State<LoadingPhotosWidget> {
|
|
|
Text("Did you know?",
|
|
|
style: Theme.of(context).textTheme.headline6.copyWith(
|
|
|
fontFamily: "Inter",
|
|
|
- color: Theme.of(context)
|
|
|
- .colorScheme
|
|
|
- .defaultTextColor
|
|
|
- .withOpacity(0.4))),
|
|
|
+ color: Theme.of(context).colorScheme.greenText)),
|
|
|
SizedBox(
|
|
|
height: 16,
|
|
|
),
|
|
|
- Text(
|
|
|
- "ente is amazing",
|
|
|
- style: Theme.of(context).textTheme.headline6.copyWith(
|
|
|
- fontFamily: "Inter",
|
|
|
- color: Theme.of(context).colorScheme.defaultTextColor),
|
|
|
- )
|
|
|
+ // Text(
|
|
|
+ // "ente is amazing",
|
|
|
+ // style: Theme.of(context).textTheme.headline6.copyWith(
|
|
|
+ // fontFamily: "Inter",
|
|
|
+ // color: Theme.of(context).colorScheme.defaultTextColor),
|
|
|
+ // )
|
|
|
+ SizedBox(
|
|
|
+ height: 80,
|
|
|
+ child: PageView.builder(
|
|
|
+ scrollDirection: Axis.vertical,
|
|
|
+ controller: _pageController,
|
|
|
+ itemBuilder: (context, index) {
|
|
|
+ return _getMessage(_messages[index]);
|
|
|
+ },
|
|
|
+ itemCount: _messages.length,
|
|
|
+ physics: NeverScrollableScrollPhysics(),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
],
|
|
|
),
|
|
|
),
|
|
@@ -89,10 +124,9 @@ class _LoadingPhotosWidgetState extends State<LoadingPhotosWidget> {
|
|
|
child: Text(
|
|
|
text,
|
|
|
textAlign: TextAlign.center,
|
|
|
- style: TextStyle(
|
|
|
- color: Colors.white.withOpacity(0.7),
|
|
|
- height: 1.5,
|
|
|
- ),
|
|
|
+ style: Theme.of(context).textTheme.headline6.copyWith(
|
|
|
+ fontFamily: "Inter",
|
|
|
+ color: Theme.of(context).colorScheme.defaultTextColor),
|
|
|
),
|
|
|
);
|
|
|
}
|