Skip to content

Instantly share code, notes, and snippets.

@manofi21
Last active August 13, 2022 09:51
Show Gist options
  • Select an option

  • Save manofi21/eb379c0a2d1bea9609b83d1dde335892 to your computer and use it in GitHub Desktop.

Select an option

Save manofi21/eb379c0a2d1bea9609b83d1dde335892 to your computer and use it in GitHub Desktop.
Fundrasing_group #fundrasing

Error ! tokiomarine@Tokios-MacBook-Pro ios % pod install
Analyzing dependencies firebase_core: Using Firebase SDK version '8.11.0' defined in 'firebase_core' firebase_dynamic_links: Using Firebase SDK version '8.11.0' defined in 'firebase_core' [!] CocoaPods could not find compatible versions for pod "firebase_dynamic_links": In Podfile: firebase_dynamic_links (from .symlinks/plugins/firebase_dynamic_links/ios)

Specs satisfying the firebase_dynamic_links (from .symlinks/plugins/firebase_dynamic_links/ios) dependency were found, but they required a higher minimum deployment target.

  • (remove iOS folder)

  • flutter create -i swift .

  • flutter clean

  • cd ios

  • open Podfile file, uncomment / remove hastage(#) from platform :ios, '9.0', and change to 10.0

  • rm -rf Pods

  • pod cache clean --all

  • pod deintegrate

  • pod setup

  • pod install

  • flutter build ios

add this line in Info.split for stripe_sdk CFBundleURLTypes CFBundleTypeRole Editor CFBundleURLName 3ds.stripesdk.io CFBundleURLSchemes stripesdk

Failed to build iOS app Error output from Xcode build: ↳ 2022-03-28 22:05:08.621 xcodebuild[41958:198777] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore 2022-03-28 22:05:08.624 xcodebuild[41958:198777] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore ** ARCHIVE FAILED **

(jam 22:11)(Fail) https://stackoverflow.com/questions/71320584/flutter-build-ios-got-error-requested-but-did-not-find-extension-point-with-ide

for .zshrc : https://osxdaily.com/2021/11/18/where-the-zshrc-file-is-located-on-mac/

  • hapus podfile.lock and folder Pods

  • rm -rf ~/Library/Developer/Xcode/DerivedData

//--------- lost count

Additional action :

  • buka file di project /Users/tokiomarine/frisidea_new_fundrasing/null_safety_fundrasing_group/fundraising_group_null_savety/ios/Pods/Pods.xcodeproj:

update IPHONEOS_DEPLOYMENT_TARGET = 8.0 => 9.0

flutter_install_all_ios_pods File.dirname(File.realpath(FILE)) end`

Now remove Podfile.lock and run pod install, then archive your project and it should work.

Condition : run in Web version Bugs : FirebaseOptions cannot be null when creating the default app.

Module 'firebase_core' not found

ß

import 'dart:async';
import 'package:flutter/material.dart';
import 'package:fundraising_group/layouts/fullmodal.layout.dart';
import 'package:fundraising_group/models/members.model.dart';
import 'package:fundraising_group/utils/constant/colors.constant.dart';
import 'package:fundraising_group/utils/functions/general.function.dart';
import 'package:fundraising_group/viewmodels/campaign.viewmodel.dart';
import 'package:fundraising_group/viewmodels/group.viewmodel.dart';
import 'package:fundraising_group/viewmodels/members.viewmodel.dart';
import 'package:fundraising_group/widgets/badge/badge.widget.dart';
import 'package:fundraising_group/widgets/borders/linedotted.widget.dart';
import 'package:fundraising_group/widgets/card/maincard.widget.dart';
import 'package:fundraising_group/widgets/icons/circleicon.widget.dart';
import 'package:fundraising_group/widgets/skeletonloader/skeletonloader.widget.dart';
import 'package:fundraising_group/widgets/textfield/textfield.widget.dart';
import 'package:provider/provider.dart';
class AssignCardsMemberView extends StatefulWidget {
const AssignCardsMemberView({Key? key}) : super(key: key);
@override
_AssignCardsMemberViewState createState() => _AssignCardsMemberViewState();
}
class _AssignCardsMemberViewState extends State<AssignCardsMemberView> {
late MembersViewModel membersViewModel;
late GroupViewModel groupViewModel;
late CampaignViewModel campaignViewModel;
int? indexItem;
Timer? debounce;
@override
void dispose() {
// TODO: implement dispose
super.dispose();
debounce?.cancel();
}
onChangeAssignToken(int index, int value, MemberModel model) {
if (debounce?.isActive ?? false) {
debounce?.cancel();
}
debounce = Timer(const Duration(milliseconds: 1500), () {
int token = value - (model.tokenLeft ?? 0);
print(token.toString());
if (value.isNegative) {
GeneralFunction.flushbar(
context: context,
message: 'Values ​​cannot be negative',
title: 'Warning',
color: ColorsConstant.redDark,
);
return;
}
if (membersViewModel.dashboardMembers.unassignedToken != null) {
if (token > (membersViewModel.dashboardMembers.unassignedToken!)) {
GeneralFunction.flushbar(
context: context,
message: 'insufficient remaining tokens',
title: 'Warning',
color: ColorsConstant.redDark,
);
return;
}
}
setState(() {
indexItem = index;
});
model.token = token;
model.tokenLeft = (model.tokenLeft ?? 0) + (model.token ?? 0);
membersViewModel.assignMembersToken(
context: context,
model: model,
);
});
}
@override
Widget build(BuildContext context) {
membersViewModel = Provider.of<MembersViewModel>(context);
groupViewModel = Provider.of<GroupViewModel>(context);
campaignViewModel = Provider.of<CampaignViewModel>(context);
return ModalFullLayout(
onClose: () {
membersViewModel.nameController.text = '';
membersViewModel.navigationService.goBack();
},
isClose: true,
title: 'ASSIGN CARDS TO MEMBERS',
colorTitleHeader: Colors.white,
child: InkWell(
// onTap: () {
// FocusScopeNode().requestFocus(FocusNode());
// },
child: Column(
children: [
Container(
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 20),
decoration: BoxDecoration(
color: ColorsConstant.white,
boxShadow: <BoxShadow>[
BoxShadow(
color: ColorsConstant.darkGray.withOpacity(0.2),
// spreadRadius: 0.,
blurRadius: 1,
offset: const Offset(0, 4),
)
],
),
child: Column(
children: [
MainCard(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'SUPPORTERS CARDS',
style: TextStyle(
color: ColorsConstant.orangePrimary,
fontWeight: FontWeight.bold,
),
),
const SizedBox(height: 5),
Row(
children: [
Text(
'${membersViewModel.dashboardMembers.unassignedToken}',
style: TextStyle(
color: ColorsConstant.blackPrimary,
fontWeight: FontWeight.bold,
fontSize: 25,
),
),
const SizedBox(width: 5),
if (!campaignViewModel.isEndCampaign) ...{
CircleIcon(
width: 25,
icon: 'assets/icons/icon_add.png',
onPressed: () {
membersViewModel.navigationService.goBack();
groupViewModel.showBuyToken(context);
},
)
}
],
)
],
),
),
const SizedBox(height: 30),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'MEMBERS',
style: TextStyle(
color: ColorsConstant.orangePrimary,
fontWeight: FontWeight.bold,
letterSpacing: 2,
),
),
SizedBox(
width: 180,
child: TextFieldWidget(
isNoCapitalFirst: true,
labelColor: ColorsConstant.darkGray,
labelText: null,
hintText: 'Search by name',
helperText: null,
obscureText: false,
focusNode: membersViewModel.nameNode,
controller: membersViewModel.nameController,
prefixIcon: Icon(
Icons.search,
color: ColorsConstant.darkGray,
),
onChanged: (value) {
membersViewModel.searchListMembersAssign(value);
},
prefixIconConstraints:
const BoxConstraints(maxHeight: 10),
suffixIconConstraints:
const BoxConstraints(maxHeight: 10),
),
)
],
),
],
),
),
Expanded(
child: SingleChildScrollView(
child: membersViewModel.dashboardMembers.member != null ||
(membersViewModel.dashboardMembers.member?.isNotEmpty ??
false)
? Column(
children: listAssignMembers(
member: membersViewModel.membersSearch.isEmpty &&
membersViewModel.nameController.text == ''
? membersViewModel.dashboardMembers.member ?? []
: membersViewModel.membersSearch,
))
: Column(
children: const [],
),
),
)
],
),
),
);
}
List<Widget> listAssignMembers({List<MemberModel> member = const []}) {
List<Widget> newsItem = <Widget>[];
for (var i = 0; i < member.length; i++) {
MemberModel memberModel = member[i];
newsItem.add(Column(
children: [
Container(
color: memberModel.isMe
? ColorsConstant.orangeLight.withOpacity(0.1)
: null,
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 25),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Text(
'${memberModel.fullName}',
style: TextStyle(
color: ColorsConstant.blackPrimary,
fontWeight: FontWeight.bold,
),
),
const SizedBox(width: 10),
if (memberModel.isMe) ...{const Badge(title: 'You')}
],
),
if (memberModel.addSupporter == 1) ...{
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
CircleIcon(
color: ColorsConstant.orangePrimary,
iconColor: ColorsConstant.white,
icon: 'assets/icons/icon_value_decrease.png',
onPressed: (memberModel.tokenLeft ?? 0) <= 0 ||
membersViewModel.isAssignToken
? () => null
: () {
setState(() {
indexItem = i;
});
int token = 0;
memberModel.token = token - 1;
memberModel.tokenLeft = memberModel.tokenLeft ??
0 + (memberModel.token ?? 0);
membersViewModel.assignMembersToken(
context: context,
model: memberModel,
);
campaignViewModel.getDashboardCampaign();
},
width: 23,
),
const SizedBox(width: 10),
// Consumer<MembersViewModel>(
// builder: (context, vm, child) {
// if (vm.isAssignToken && indexItem == i) {
// return SkeletonLoader(
// width: 25,
// height: 25,
// isCircle: true,
// );
// }
// return Text(
// '${memberModel.tokenLeft}',
// style: TextStyle(
// color: ColorsConstant.blackPrimary,
// fontWeight: FontWeight.bold,
// fontSize: 20,
// ),
// );
// },
// ),
Consumer<MembersViewModel>(
builder: (context, vm, child) {
if (vm.isAssignToken && indexItem == i) {
return const SkeletonLoader(
width: 25,
height: 25,
isCircle: true,
);
}
return ConstrainedBox(
constraints: const BoxConstraints(minWidth: 20),
child: IntrinsicWidth(
child: TextFieldWidget(
isNoBorder: true,
maxLength: 5,
fontSize: 19,
fontWeight: FontWeight.bold,
labelColor: ColorsConstant.blackPrimary,
textAlign: TextAlign.center,
textInputType: TextInputType.number,
labelText: null,
helperText: null,
obscureText: false,
focusNode: null,
controller: null,
initialValue: memberModel.tokenLeft.toString(),
onChanged: (value) {
onChangeAssignToken(
i,
int.parse(value),
memberModel,
);
},
),
),
);
},
),
const SizedBox(width: 10),
CircleIcon(
color: ColorsConstant.orangePrimary,
iconColor: ColorsConstant.white,
icon: 'assets/icons/icon_value_increase.png',
onPressed: membersViewModel.isAssignToken ||
(membersViewModel.dashboardMembers.totalToken ??
0) <=
0
? () => null
: () {
setState(() {
indexItem = i;
});
int token = 0;
memberModel.token = token + 1;
memberModel.tokenLeft = memberModel.tokenLeft ??
0 + (memberModel.token ?? 0);
setState(() {});
membersViewModel.assignMembersToken(
context: context,
model: memberModel,
);
campaignViewModel.getDashboardCampaign();
},
width: 23,
),
],
)
} else ...{
SizedBox(
width: 100,
child: Text(
"No permission to make sale",
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.bold,
color: ColorsConstant.orangePrimary,
),
),
)
}
],
),
),
LineDotted(
color: ColorsConstant.blackPrimary,
height: 0.5,
),
],
));
}
return newsItem;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment