Merge branch 'master' of https://gitlab.com/Cloud_Solution/mohemm-flutter-app into sultan-dev
commit
5384d0e59c
@ -0,0 +1,17 @@
|
|||||||
|
class WinnerModel {
|
||||||
|
String? id;
|
||||||
|
String? marathoneId;
|
||||||
|
String? employeeId;
|
||||||
|
String? nameEn;
|
||||||
|
String? nameAr;
|
||||||
|
|
||||||
|
WinnerModel({id, marathoneId, employeeId, nameEn, nameAr});
|
||||||
|
|
||||||
|
WinnerModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
id = json['id'];
|
||||||
|
marathoneId = json['marathoneId'];
|
||||||
|
employeeId = json['employeeId'];
|
||||||
|
nameEn = json['nameEn'];
|
||||||
|
nameAr = json['nameAr'];
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,90 +0,0 @@
|
|||||||
import 'package:easy_localization/easy_localization.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:lottie/lottie.dart';
|
|
||||||
import 'package:mohem_flutter_app/classes/colors.dart';
|
|
||||||
import 'package:mohem_flutter_app/classes/lottie_consts.dart';
|
|
||||||
import 'package:mohem_flutter_app/config/routes.dart';
|
|
||||||
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
|
||||||
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
|
||||||
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
|
|
||||||
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
|
|
||||||
import 'package:mohem_flutter_app/ui/marathon/marathon_provider.dart';
|
|
||||||
import 'package:mohem_flutter_app/ui/marathon/widgets/custom_status_widget.dart';
|
|
||||||
import 'package:mohem_flutter_app/ui/marathon/widgets/marathon_qualifiers_container.dart';
|
|
||||||
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
|
|
||||||
import 'package:provider/provider.dart';
|
|
||||||
|
|
||||||
class MarathonWinnerSelection extends StatelessWidget {
|
|
||||||
const MarathonWinnerSelection({Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
MarathonProvider provider = context.read<MarathonProvider>();
|
|
||||||
return Scaffold(
|
|
||||||
appBar: AppBarWidget(context, title: LocaleKeys.brainMarathon.tr()),
|
|
||||||
body: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
20.height,
|
|
||||||
QualifiersContainer(provider: provider,).paddingOnly(left: 21, right: 21),
|
|
||||||
12.height,
|
|
||||||
InkWell(
|
|
||||||
onTap: () {
|
|
||||||
Navigator.pushNamed(context, AppRoutes.marathonWinnerScreen);
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
height: 50,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: MyColors.greenColor,
|
|
||||||
borderRadius: BorderRadius.circular(15),
|
|
||||||
boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
color: const Color(0xff000000).withOpacity(.05),
|
|
||||||
blurRadius: 26,
|
|
||||||
offset: const Offset(0, -3),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: <Widget>[
|
|
||||||
"Muhammad Shrouff".toText17(isBold: true, color: MyColors.white),
|
|
||||||
"837436".toText17(isBold: true, color: MyColors.white),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
).paddingOnly(left: 20, right: 20),
|
|
||||||
),
|
|
||||||
CustomStatusWidget(
|
|
||||||
asset: Lottie.asset(
|
|
||||||
MyLottieConsts.winnerLottie,
|
|
||||||
height: 168,
|
|
||||||
),
|
|
||||||
title: Text(
|
|
||||||
LocaleKeys.fingersCrossed.tr(),
|
|
||||||
style: const TextStyle(
|
|
||||||
height: 27 / 27,
|
|
||||||
color: MyColors.greenColor,
|
|
||||||
fontSize: 27,
|
|
||||||
letterSpacing: -1.08,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
subTitle: Text(
|
|
||||||
LocaleKeys.winnerSelectedRandomly.tr(),
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: const TextStyle(
|
|
||||||
color: MyColors.darkTextColor,
|
|
||||||
fontSize: 18,
|
|
||||||
letterSpacing: -0.72,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
)).paddingOnly(left: 21, right: 21, top: 20, bottom: 20),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -0,0 +1,84 @@
|
|||||||
|
import 'package:animated_text_kit/animated_text_kit.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
import 'package:mohem_flutter_app/classes/colors.dart';
|
||||||
|
import 'package:mohem_flutter_app/config/routes.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
|
||||||
|
import 'package:mohem_flutter_app/models/chat/get_search_user_chat_model.dart';
|
||||||
|
import 'package:mohem_flutter_app/provider/chat_provider_model.dart';
|
||||||
|
import 'package:mohem_flutter_app/widgets/circular_avatar.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
AppBar ChatAppBarWidget(BuildContext context,
|
||||||
|
{required String title,
|
||||||
|
bool showHomeButton = true,
|
||||||
|
String? image,
|
||||||
|
ChatUser? chatUser,
|
||||||
|
bool showTyping = false,
|
||||||
|
List<Widget>? actions,
|
||||||
|
void Function()? onHomeTapped,
|
||||||
|
void Function()? onBackTapped}) {
|
||||||
|
return AppBar(
|
||||||
|
leadingWidth: 0,
|
||||||
|
title: Row(
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
|
onTap: Feedback.wrapForTap(() {
|
||||||
|
(onBackTapped == null ? Navigator.maybePop(context) : onBackTapped());
|
||||||
|
}, context),
|
||||||
|
child: const Icon(Icons.arrow_back_ios, color: MyColors.darkIconColor),
|
||||||
|
),
|
||||||
|
4.width,
|
||||||
|
if (image != null)
|
||||||
|
CircularAvatar(
|
||||||
|
url: image,
|
||||||
|
height: 40,
|
||||||
|
width: 40,
|
||||||
|
isImageBase64: true,
|
||||||
|
),
|
||||||
|
if (image != null) 14.width,
|
||||||
|
SizedBox(
|
||||||
|
height: 40,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
title.toText20(color: MyColors.darkTextColor, isBold: true).expanded,
|
||||||
|
if (showTyping)
|
||||||
|
Consumer<ChatProviderModel>(
|
||||||
|
builder: (BuildContext cxt, ChatProviderModel data, Widget? child) {
|
||||||
|
if (chatUser!.isTyping!) {
|
||||||
|
// return ("Typing ...").toText10(color: MyColors.textMixColor);
|
||||||
|
return AnimatedTextKit(
|
||||||
|
animatedTexts: [
|
||||||
|
ScaleAnimatedText('Typing...', textStyle: const TextStyle(color: MyColors.textMixColor, fontSize: 10, letterSpacing: -0.4, fontStyle: FontStyle.normal)),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return const SizedBox();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
centerTitle: false,
|
||||||
|
elevation: 0,
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
actions: [
|
||||||
|
if (showHomeButton)
|
||||||
|
IconButton(
|
||||||
|
onPressed: () {
|
||||||
|
onHomeTapped == null ? Navigator.popUntil(context, ModalRoute.withName(AppRoutes.dashboard)) : onHomeTapped();
|
||||||
|
},
|
||||||
|
icon: const Icon(Icons.home, color: MyColors.darkIconColor),
|
||||||
|
),
|
||||||
|
...actions ?? []
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue