Code:
import 'package:flip_panel/flip_panel.dart';
import 'package:flutter/material.dart';
// ignore: must_be_immutable
class FlipDayToGo4 extends StatelessWidget {
final bool debugMode = true;
DateTime now = DateTime.now();
DateTime dDay = DateTime(2018, 11, 26, 0, 0, 0);
@override
Widget build(BuildContext context) {
dDay = (debugMode)
? DateTime(now.year, now.month + 2, now.day, now.hour, now.minute,
now.second + 10)
: dDay;
Duration _duration = dDay.difference(now);
return Scaffold(
backgroundColor: Colors.deepOrange.shade50,
body: Center(
child: SizedBox(
height: 64.0,
child: FlipClock.reverseCountdown(
duration: _duration,
digitColor: Colors.white,
backgroundColor: Colors.black87,
digitSize: 30.0,
borderRadius: const BorderRadius.all(Radius.circular(3.0)),
),
),
),
);
}
}
0 Comments