Merge branch 'diplomatic-quarter-live' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into sultan
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 445 B |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 244 KiB |
Before Width: | Height: | Size: 644 B After Width: | Height: | Size: 475 B |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 475 B |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 139 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 606 B |
After Width: | Height: | Size: 1.3 KiB |
@ -0,0 +1 @@
|
||||
da98d9f0c1f407e541c636e84847ac81
|
@ -0,0 +1,12 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
class ToDoCountProviderModel with ChangeNotifier {
|
||||
int _count;
|
||||
|
||||
int get count => _count;
|
||||
|
||||
void setState(int count) {
|
||||
_count = count;
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
import 'dart:async';
|
||||
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SplashScreen extends StatefulWidget {
|
||||
@override
|
||||
_SplashScreenState createState() => _SplashScreenState();
|
||||
}
|
||||
|
||||
class _SplashScreenState extends State<SplashScreen> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
Timer(
|
||||
Duration(seconds: 3),
|
||||
() => Navigator.of(context).pushReplacement(
|
||||
MaterialPageRoute(
|
||||
builder: (BuildContext context) => LandingPage(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
body: Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Image.asset('assets/images/DQ/DQ_logo.png'),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../widgets/Loader/gif_loader_container.dart';
|
||||
|
||||
class GifLoaderDialogUtils {
|
||||
static showMyDialog(BuildContext context) {
|
||||
showDialog(context: context, child: GifLoaderContainer());
|
||||
}
|
||||
|
||||
static hideDialog(BuildContext context) {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_gifimage/flutter_gifimage.dart';
|
||||
|
||||
class GifLoaderContainer extends StatefulWidget {
|
||||
@override
|
||||
_GifLoaderContainerState createState() => _GifLoaderContainerState();
|
||||
}
|
||||
|
||||
class _GifLoaderContainerState extends State<GifLoaderContainer>
|
||||
with TickerProviderStateMixin {
|
||||
GifController controller1;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
controller1 = GifController(vsync: this);
|
||||
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
controller1.repeat(
|
||||
min: 0, max: 11, period: Duration(milliseconds: 750), reverse: true);
|
||||
});
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
controller1.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Center(
|
||||
//progress-loading.gif
|
||||
child: Container(
|
||||
// margin: EdgeInsets.only(bottom: 40),
|
||||
child: GifImage(
|
||||
controller: controller1,
|
||||
image: AssetImage(
|
||||
"assets/images/progress-loading.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
@ -0,0 +1,112 @@
|
||||
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
/// FloatingButton widget
|
||||
/// [onTap] button function
|
||||
/// [elevation] color elevation value
|
||||
class FloatingButton extends StatefulWidget {
|
||||
FloatingButton({Key key, this.onTap, this.elevation: true}) : super(key: key);
|
||||
|
||||
final VoidCallback onTap;
|
||||
final bool elevation;
|
||||
|
||||
@override
|
||||
_FloatingButtonState createState() => _FloatingButtonState();
|
||||
}
|
||||
|
||||
class _FloatingButtonState extends State<FloatingButton>
|
||||
with TickerProviderStateMixin {
|
||||
double _buttonSize = 1.0;
|
||||
AnimationController _animationController;
|
||||
Animation _animation;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
_animationController = AnimationController(
|
||||
vsync: this,
|
||||
lowerBound: 0.7,
|
||||
upperBound: 1.0,
|
||||
duration: Duration(milliseconds: 120));
|
||||
_animation = CurvedAnimation(
|
||||
parent: _animationController,
|
||||
curve: Curves.easeOutQuad,
|
||||
reverseCurve: Curves.easeOutQuad);
|
||||
_animation.addListener(() {
|
||||
setState(() {
|
||||
_buttonSize = _animation.value;
|
||||
});
|
||||
});
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_animationController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
ProjectViewModel projectViewModel = Provider.of(context);
|
||||
return (GestureDetector(
|
||||
onTapDown: (TapDownDetails tap) {
|
||||
_animationController.reverse(from: 1.0);
|
||||
},
|
||||
onTapUp: (TapUpDetails tap) {
|
||||
_animationController.forward();
|
||||
},
|
||||
onTapCancel: () {
|
||||
_animationController.forward();
|
||||
},
|
||||
onTap: Feedback.wrapForTap(widget.onTap, context),
|
||||
behavior: HitTestBehavior.opaque,
|
||||
child: Transform.scale(
|
||||
scale: _buttonSize,
|
||||
child: AnimatedContainer(
|
||||
duration: Duration(milliseconds: 150),
|
||||
margin: EdgeInsets.only(bottom: 4),
|
||||
padding: EdgeInsets.symmetric(vertical: 24, horizontal: 24),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(54.0)),
|
||||
color: Theme.of(context).primaryColor,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Color.fromRGBO(
|
||||
120, 71, 80, widget.elevation ? 0.28 : 0.0),
|
||||
spreadRadius:
|
||||
_buttonSize < 1.0 ? -(1 - _buttonSize) * 50 : 0.0,
|
||||
offset: Offset(0, 7.0),
|
||||
blurRadius: 55.0)
|
||||
]),
|
||||
child: Container(
|
||||
child: Column(
|
||||
children: [
|
||||
Icon(EvaIcons.calendar,color: Colors.white,size: 23,),
|
||||
Texts(
|
||||
TranslationBase.of(context).book,
|
||||
bold: !projectViewModel.isArabic,
|
||||
color: Colors.white,
|
||||
fontSize: projectViewModel.isArabic ? 8 : 17,
|
||||
),
|
||||
Texts(
|
||||
TranslationBase.of(context).appointmentLabel,
|
||||
bold: projectViewModel.isArabic,
|
||||
color: Colors.white,
|
||||
fontSize:projectViewModel.isArabic ? 8.8 : 8,
|
||||
),
|
||||
],
|
||||
),
|
||||
width: 54,
|
||||
height: 54,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
)),
|
||||
));
|
||||
}
|
||||
}
|