Merge branch 'development_haroon' into 'master'

Development haroon

See merge request Cloud_Solution/mohemm-flutter-app!132
merge-requests/133/merge
haroon amjad 3 years ago
commit c865eca9c9

@ -1200,7 +1200,7 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
playerController.dispose(); playerController.dispose();
} }
void startRecoding() async { void startRecoding(BuildContext context) async {
// if (await Permission.microphone.request().isGranted) { // if (await Permission.microphone.request().isGranted) {
// sRecoding(); // sRecoding();
// } else { // } else {
@ -1209,13 +1209,25 @@ class ChatProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
// } // }
await Permission.microphone.request().then((PermissionStatus status) { await Permission.microphone.request().then((PermissionStatus status) {
if (status.isPermanentlyDenied) { if (status.isPermanentlyDenied) {
openAppSettings(); Utils.confirmDialog(
context,
"The app needs microphone access to be able to record audio.",
onTap: () {
openAppSettings();
},
);
} else if (status.isDenied) { } else if (status.isDenied) {
openAppSettings(); Utils.confirmDialog(
context,
"The app needs microphone access to be able to record audio.",
onTap: () {
openAppSettings();
},
);
} else if (status.isGranted) { } else if (status.isGranted) {
sRecoding(); sRecoding();
} else { } else {
startRecoding(); startRecoding(context);
} }
}); });
} }

@ -244,7 +244,7 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
void getCategoryOffersListAPI(BuildContext context) async { void getCategoryOffersListAPI(BuildContext context) async {
try { try {
// Utils.showLoading(context); // Utils.showLoading(context);
getOffersList = await OffersAndDiscountsApiClient().getOffersList(0, 6); getOffersList = await OffersAndDiscountsApiClient().getOffersList(0, 10);
isOffersLoading = false; isOffersLoading = false;
notifyListeners(); notifyListeners();
} catch (ex) { } catch (ex) {

@ -301,7 +301,7 @@ class _ChatDetailScreenState extends State<ChatDetailScreen> {
Icons.mic, Icons.mic,
color: MyColors.lightGreenColor, color: MyColors.lightGreenColor,
).paddingOnly(right: 15).onPress(() { ).paddingOnly(right: 15).onPress(() {
m.startRecoding(); m.startRecoding(context);
}), }),
SvgPicture.asset("assets/icons/chat/chat_send_icon.svg", height: 26, width: 26) SvgPicture.asset("assets/icons/chat/chat_send_icon.svg", height: 26, width: 26)
.onPress( .onPress(

@ -101,7 +101,7 @@ class _MyTeamScreenState extends State<MyTeamScreen> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
(m.teamMembersList![index].userName!.replaceFirst(".", " ").capitalizeFirstofEach ?? "").toText14(color: MyColors.darkTextColor).paddingOnly(left: 11, top: 13), (m.teamMembersList[index].userName! ?? "").toText14(color: MyColors.darkTextColor).paddingOnly(left: 11, top: 13),
], ],
).expanded, ).expanded,
// SizedBox( // SizedBox(

@ -415,7 +415,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
); );
}, },
separatorBuilder: (BuildContext cxt, int index) => 8.width, separatorBuilder: (BuildContext cxt, int index) => 8.width,
itemCount: 6), itemCount: 9),
); );
}, },
), ),
@ -463,7 +463,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
"assets/icons/create_req.svg", "assets/icons/create_req.svg",
color: currentIndex == 1 ? MyColors.grey3AColor : MyColors.grey98Color, color: currentIndex == 1 ? MyColors.grey3AColor : MyColors.grey98Color,
).paddingAll(4), ).paddingAll(4),
label: LocaleKeys.createRequest.tr(), label: LocaleKeys.mowadhafhiRequest.tr(),
), ),
BottomNavigationBarItem( BottomNavigationBarItem(
icon: Stack( icon: Stack(

@ -20,7 +20,7 @@ class ImageOptions {
if (Platform.isAndroid) { if (Platform.isAndroid) {
cameraImageAndroid(image); cameraImageAndroid(image);
} else { } else {
File _image = File((await ImagePicker.platform.pickImage(source: ImageSource.camera, imageQuality: 10))?.path ?? ""); File _image = File((await ImagePicker.platform.pickImage(source: ImageSource.camera, imageQuality: 20))?.path ?? "");
String fileName = _image.path; String fileName = _image.path;
var bytes = File(fileName).readAsBytesSync(); var bytes = File(fileName).readAsBytesSync();
String base64Encode = base64.encode(bytes); String base64Encode = base64.encode(bytes);
@ -33,7 +33,7 @@ class ImageOptions {
if (Platform.isAndroid) { if (Platform.isAndroid) {
galleryImageAndroid(image); galleryImageAndroid(image);
} else { } else {
File _image = File((await ImagePicker.platform.pickImage(source: ImageSource.gallery, imageQuality: 10))?.path ?? ""); File _image = File((await ImagePicker.platform.pickImage(source: ImageSource.gallery, imageQuality: 20))?.path ?? "");
String fileName = _image.path; String fileName = _image.path;
var bytes = File(fileName).readAsBytesSync(); var bytes = File(fileName).readAsBytesSync();
String base64Encode = base64.encode(bytes); String base64Encode = base64.encode(bytes);
@ -114,7 +114,7 @@ class ImageOptions {
} }
void galleryImageAndroid(Function(String, File) image) async { void galleryImageAndroid(Function(String, File) image) async {
File _image = File((await ImagePicker.platform.pickImage(source: ImageSource.gallery, imageQuality: 10))?.path ?? ""); File _image = File((await ImagePicker.platform.pickImage(source: ImageSource.gallery, imageQuality: 20))?.path ?? "");
String fileName = _image.path; String fileName = _image.path;
var bytes = File(fileName).readAsBytesSync(); var bytes = File(fileName).readAsBytesSync();
String base64Encode = base64.encode(bytes); String base64Encode = base64.encode(bytes);
@ -124,7 +124,7 @@ void galleryImageAndroid(Function(String, File) image) async {
} }
void cameraImageAndroid(Function(String, File) image) async { void cameraImageAndroid(Function(String, File) image) async {
File _image = File((await ImagePicker.platform.pickImage(source: ImageSource.camera, imageQuality: 10))?.path ?? ""); File _image = File((await ImagePicker.platform.pickImage(source: ImageSource.camera, imageQuality: 20))?.path ?? "");
String fileName = _image.path; String fileName = _image.path;
var bytes = File(fileName).readAsBytesSync(); var bytes = File(fileName).readAsBytesSync();
String base64Encode = base64.encode(bytes); String base64Encode = base64.encode(bytes);

@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at # Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 3.1.5+300015 version: 3.6.0+300060
environment: environment:
sdk: ">=2.16.0 <3.0.0" sdk: ">=2.16.0 <3.0.0"

Loading…
Cancel
Save