Merge branch 'development_new_design_2.0' into haroon-new-design
# Conflicts: # lib/config/config.dartmerge-requests/462/head
commit
5e5f540431
@ -1,4 +1,4 @@
|
||||
org.gradle.jvmargs=-Xmx1536M
|
||||
android.enableR8=true
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
android.enableJetifier=true
|
||||
@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" width="124px" height="54px" viewBox="0 0 606.61 165.15" fill="#007c7f"><g>
|
||||
<path class="cls-1" d="M152.63,74.48a9.57,9.57,0,0,0-9.57,9.57,62,62,0,1,1-123.91,0V60H58A9.58,9.58,0,0,0,58,40.8H19.15V9.57A9.58,9.58,0,0,0,0,9.57V84.05a81.11,81.11,0,0,0,162.21,0,9.57,9.57,0,0,0-9.58-9.57"></path><path class="cls-1" d="M94.55,60a9.59,9.59,0,0,0,9.57-9.58,9.67,9.67,0,0,0-2.82-6.77,9.15,9.15,0,0,0-1.44-1.18,8.49,8.49,0,0,0-1.66-.87A8.65,8.65,0,0,0,96.41,41a9.8,9.8,0,0,0-3.74,0,8.93,8.93,0,0,0-1.8.56,8.41,8.41,0,0,0-1.65.87,9.56,9.56,0,0,0-1.45,14.73A9.61,9.61,0,0,0,94.55,60"></path><path class="cls-1" d="M131.11,60a9.57,9.57,0,0,0,6.77-16.33,9.29,9.29,0,0,0-1.47-1.2,8.41,8.41,0,0,0-1.65-.87A8.65,8.65,0,0,0,133,41a9.8,9.8,0,0,0-3.74,0,9.13,9.13,0,0,0-1.8.56,8.41,8.41,0,0,0-1.65.87,8.72,8.72,0,0,0-1.45,1.2A9.57,9.57,0,0,0,131.11,60"></path><path class="cls-1" d="M250.06,98.93A5.11,5.11,0,0,0,245,104c0,10.75-8.19,19.5-18.26,19.5s-18.25-8.75-18.25-19.5V68.67h32.61a5.11,5.11,0,0,0,0-10.22H208.44v-27a5.11,5.11,0,1,0-10.22,0V104c0,16.39,12.77,29.72,28.47,29.72s28.48-13.33,28.48-29.72a5.11,5.11,0,0,0-5.11-5.11"></path><path class="cls-1" d="M551.34,64.91a5.1,5.1,0,0,0-.72-7.19,27.47,27.47,0,0,0-17.54-6.3c-15.7,0-28.47,13.33-28.47,29.71v47.08a5.11,5.11,0,0,0,10.22,0V81.13c0-10.75,8.19-19.49,18.25-19.49a17.31,17.31,0,0,1,11.07,4,5.11,5.11,0,0,0,7.19-.73"></path><path class="cls-1" d="M404.3,51.42a28.11,28.11,0,0,0-23.36,12.76,28.13,28.13,0,0,0-23.37-12.76c-15.7,0-28.47,13.33-28.47,29.71v47.08a5.11,5.11,0,0,0,10.22,0V81.13c0-10.74,8.19-19.49,18.25-19.49s18.26,8.75,18.26,19.49v47.08a5.11,5.11,0,0,0,10.22,0V81.13c0-10.74,8.18-19.49,18.25-19.49s18.25,8.75,18.25,19.49v47.08a5.11,5.11,0,1,0,10.22,0V81.13c0-16.38-12.77-29.71-28.47-29.71"></path><path class="cls-1" d="M291.28,51.42a27.47,27.47,0,0,0-17.54,6.3,5.11,5.11,0,0,0,6.47,7.92,17.31,17.31,0,0,1,11.07-4c.59,0,1.17,0,1.75.09l.56.08c.38,0,.77.11,1.15.19l.63.15,1,.28.64.22c.33.11.65.24,1,.38l.61.26c.33.16.65.33,1,.5l.52.29c.39.23.76.47,1.13.73l.28.19c.45.33.89.68,1.31,1,.12.1.24.22.35.33.3.27.6.55.88.85l.42.47c.24.26.47.54.7.82s.27.35.41.54.41.57.61.86.25.38.36.58.38.63.55,1,.21.38.3.57c.19.38.36.76.52,1.15.07.16.14.3.2.45.22.56.41,1.11.58,1.68,0,.12.05.23.08.34.11.4.21.81.3,1.22H290A27.21,27.21,0,0,0,262.81,104c0,16.39,12.77,29.72,28.47,29.72a37.49,37.49,0,0,0,18.26-5,5.11,5.11,0,0,0,10.21-.11V81.13c0-16.38-12.77-29.71-28.47-29.71M273,104a17,17,0,0,1,17-17h19.54v29.39c-2.86,2.33-9.71,7.07-18.25,7.07-10.06,0-18.25-8.75-18.25-19.5"></path><path class="cls-1" d="M467.23,51.42a27.47,27.47,0,0,0-17.54,6.3,5.11,5.11,0,0,0,6.47,7.92,17.31,17.31,0,0,1,11.07-4c.59,0,1.17,0,1.75.09l.56.08c.38,0,.77.11,1.14.19.22,0,.43.1.64.15l1,.28.64.22c.33.11.65.24,1,.38l.61.26c.33.16.65.33,1,.5l.52.29c.38.23.76.47,1.13.73l.28.19c.45.33.89.68,1.31,1,.12.1.23.22.35.33.3.27.6.55.88.85l.42.47c.24.26.47.54.7.82s.27.35.41.54.41.57.61.86.25.38.37.58.37.63.54,1,.21.38.3.57c.19.38.36.76.52,1.15.07.15.14.3.2.45.21.56.41,1.11.58,1.68,0,.12.05.23.08.34.11.4.21.81.3,1.22H465.94A27.21,27.21,0,0,0,438.76,104c0,16.39,12.77,29.72,28.47,29.72a37.49,37.49,0,0,0,18.26-5,5.11,5.11,0,0,0,10.21-.11V81.13c0-16.38-12.77-29.71-28.47-29.71M449,104a17,17,0,0,1,17-17h19.54v29.39c-2.86,2.33-9.71,7.07-18.25,7.07-10.06,0-18.25-8.75-18.25-19.5"></path><path class="cls-1" d="M578.14,51.42a27.47,27.47,0,0,0-17.54,6.3,5.11,5.11,0,0,0,6.47,7.92,17.31,17.31,0,0,1,11.07-4c.59,0,1.17,0,1.75.09l.56.08c.38,0,.77.11,1.14.19.22,0,.43.1.64.15l1,.28.64.22c.33.11.66.24,1,.38l.59.26c.34.16.66.33,1,.51l.52.28c.39.23.77.48,1.14.74l.27.18c.45.33.89.68,1.31,1l.35.32c.3.28.59.56.88.86l.42.46c.24.27.47.54.7.83s.28.35.41.54.41.57.6.86.26.38.38.58.36.62.53.94.22.39.32.59c.18.36.34.74.5,1.12.07.16.15.32.21.48.21.55.41,1.1.57,1.67,0,.13.07.27.1.4.11.38.2.77.29,1.16H576.85A27.21,27.21,0,0,0,549.67,104c0,16.39,12.77,29.72,28.47,29.72a37.49,37.49,0,0,0,18.26-5,5.11,5.11,0,0,0,10.21-.11V81.13c0-16.38-12.77-29.71-28.47-29.71M559.89,104a17,17,0,0,1,17-17h19.54v29.39c-2.86,2.33-9.71,7.07-18.25,7.07-10.06,0-18.25-8.75-18.25-19.5"></path>
|
||||
|
||||
</g></svg>
|
||||
|
After Width: | Height: | Size: 4.0 KiB |
@ -0,0 +1,35 @@
|
||||
class TamaraPaymentOption {
|
||||
String name;
|
||||
double minLimit;
|
||||
double maxLimit;
|
||||
int id;
|
||||
|
||||
String fullName() => '$name Months';
|
||||
|
||||
TamaraPaymentOption({
|
||||
this.name,
|
||||
this.minLimit,
|
||||
this.maxLimit,
|
||||
this.id});
|
||||
|
||||
|
||||
@override
|
||||
String toString() => fullName();
|
||||
|
||||
TamaraPaymentOption.fromJson(dynamic json) {
|
||||
name = json["name"];
|
||||
minLimit = json["min_limit"];
|
||||
maxLimit = json["max_limit"];
|
||||
id = json["id"];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
var map = <String, dynamic>{};
|
||||
map["name"] = name;
|
||||
map["min_limit"] = minLimit;
|
||||
map["max_limit"] = maxLimit;
|
||||
map["id"] = id;
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,127 @@
|
||||
import 'package:diplomaticquarterapp/core/model/packages_offers/responses/tamara_payment_option.dart';
|
||||
import 'package:diplomaticquarterapp/theme/colors.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:jiffy/jiffy.dart';
|
||||
import 'package:manage_calendar_events/manage_calendar_events.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
|
||||
|
||||
class SingleSelectionDialog<T> extends StatefulWidget {
|
||||
final List<T> items;
|
||||
final String title;
|
||||
|
||||
SingleSelectionDialog(this.items, {Widget icon, @required this.title});
|
||||
|
||||
Future<T> show(BuildContext context) async {
|
||||
return showDialog<T>(
|
||||
context: context,
|
||||
barrierDismissible: true, // user must tap button!
|
||||
builder: (BuildContext context) {
|
||||
return Dialog(
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(0.0)),
|
||||
insetPadding: EdgeInsets.all(21),
|
||||
child: this,
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
_SingleSelectionDialogState createState() => _SingleSelectionDialogState();
|
||||
}
|
||||
|
||||
class _SingleSelectionDialogState extends State<SingleSelectionDialog> {
|
||||
int i = 0;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
//width: MediaQuery.of(context).size.width / 0.8,
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.notifications_active,
|
||||
color: Color(0xff2B353E),
|
||||
size: 50,
|
||||
),
|
||||
IconButton(
|
||||
icon: Icon(Icons.clear),
|
||||
color: Color(0xff2B353E),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
mHeight(20),
|
||||
Text(
|
||||
widget.title,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: Color(0xff2B353E),
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.48,
|
||||
),
|
||||
),
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 20),
|
||||
child: optionList(widget.items),
|
||||
),
|
||||
|
||||
mHeight(12),
|
||||
DefaultButton(
|
||||
TranslationBase.of(context).done,
|
||||
() {
|
||||
Navigator.pop(context, widget.items[i]);
|
||||
},
|
||||
color: CustomColors.green,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget optionList(List<dynamic> options){
|
||||
return ListView(
|
||||
shrinkWrap: true,
|
||||
children: List.generate(options.length, (index){
|
||||
|
||||
final opt = options[index];
|
||||
return Row(
|
||||
children: [
|
||||
Radio<int>(
|
||||
value: index,
|
||||
groupValue: i,
|
||||
onChanged: (int value) {
|
||||
setState(() {
|
||||
i = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
Text(
|
||||
opt.toString(),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.48,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue