Skip to content

Commit

Permalink
Recursively call the account creation api for the set username
Browse files Browse the repository at this point in the history
  • Loading branch information
kjawadDeveloper2 committed Mar 31, 2024
1 parent ef21f2a commit 03afe53
Show file tree
Hide file tree
Showing 39 changed files with 982 additions and 947 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
"go.lintTool": "golangci-lint",
"go.inferGopath": false,
"git.ignoreLimitWarning": true,
"dart.lineLength": 120,
}
4 changes: 2 additions & 2 deletions dart_sdk/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 31
compileSdkVersion 34

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand All @@ -45,7 +45,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.pylons.example"
minSdkVersion 16
targetSdkVersion 30
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
10 changes: 7 additions & 3 deletions dart_sdk/lib/src/ui/pylons_loading_animation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ class PylonsLoadingAnimation {
context: context,
barrierDismissible: true,
barrierColor: Colors.white.withOpacity(0),
builder: (ctx) => WillPopScope(
onWillPop: () async => false,
builder: (ctx) => PopScope(
canPop: false,
child: AlertDialog(
elevation: 0,
backgroundColor: Colors.transparent,
content: SizedBox(height: _height, width: _width, child: Image.asset('assets/loading.gif', package: 'pylons_sdk',)),
content: SizedBox(
height: _height,
width: _width,
child: Image.asset('assets/loading.gif', package: 'pylons_sdk'),
),
),
),
);
Expand Down
4 changes: 2 additions & 2 deletions easel/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ apply plugin: 'com.google.firebase.crashlytics'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 33
compileSdkVersion 34

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand All @@ -47,7 +47,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "tech.pylons.easel"
minSdkVersion 21
targetSdkVersion 32
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName

Expand Down
4 changes: 2 additions & 2 deletions easel/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '1.9.22'
repositories {
google()
mavenCentral()
Expand All @@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ class _DraftDetailDialogState extends State<_DraftDetailDialog> {
Widget build(BuildContext context) {
final EaselProvider easelProvider = context.watch<EaselProvider>();

return WillPopScope(
onWillPop: () async => false,
return PopScope(
canPop: false,
child: Dialog(
backgroundColor: EaselAppTheme.kTransparent,
insetPadding: EdgeInsets.symmetric(horizontal: isTablet ? 65.w : 21.w),
Expand Down
8 changes: 3 additions & 5 deletions easel/lib/screens/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,9 @@ class HomeScreenState extends State<HomeScreen> {

@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
onBackPressed();
return false;
},
return PopScope(
canPop: false,
onPopInvoked: (didPop) => onBackPressed(),
child: ColoredBox(
color: EaselAppTheme.kWhite,
child: SafeArea(
Expand Down
113 changes: 52 additions & 61 deletions easel/lib/screens/preview_nft/preview_nft_full_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,80 +25,71 @@ class _PreviewNFTFullScreenState extends State<PreviewNFTFullScreen> {
@override
void initState() {
scheduleMicrotask(() {
easelProvider.initializePlayers(
publishedNFT: easelProvider.publishedNFTClicked);
easelProvider.initializePlayers(publishedNFT: easelProvider.publishedNFTClicked);
});
super.initState();
}

void onBackPressed({required BuildContext context}) {
if (easelProvider.publishedNFTClicked.assetType == AssetType.Video.name &&
easelProvider.videoPlayerController.value.isInitialized) {
if (easelProvider.videoPlayerController.value.isPlaying) {
easelProvider.videoPlayerController.pause();
}
}
easelProvider.videoLoadingError = '';

Navigator.pop(context);
}

@override
Widget build(BuildContext context) {
return Material(
child: WillPopScope(
onWillPop: () async {
onBackPressed(context: context);
return true;
},
child: Stack(
children: [
PreviewNFTBuilder(
onImage: (context) => NftImageWidget(
imageUrl: easelProvider.publishedNFTClicked.url),
onVideo: (context) => const NFTVideoPlayerScreen(),
on3D: (context) => Model3dViewer(
isFile: false,
path: easelProvider.publishedNFTClicked.url,
),
assetType: easelProvider.publishedNFTClicked.assetType
.toAssetTypeEnum()),
Column(
children: [
ClipRect(
child: ColoredBox(
color: Colors.black.withOpacity(0.3),
child: Padding(
padding: EdgeInsets.fromLTRB(20.w, 30.h, 0, 10.h),
child: Row(
children: [
IconButton(
onPressed: () {
onBackPressed(context: context);
},
icon: Icon(
Icons.arrow_back_ios,
size: 22.h,
color: EaselAppTheme.kWhite,
),
),
Text(
kBack,
style: EaselAppTheme.titleStyle.copyWith(
fontSize: 18.sp, color: EaselAppTheme.kWhite),
child: Stack(
children: [
PreviewNFTBuilder(
onImage: (context) => NftImageWidget(imageUrl: easelProvider.publishedNFTClicked.url),
onVideo: (context) => const NFTVideoPlayerScreen(),
on3D: (context) => Model3dViewer(
isFile: false,
path: easelProvider.publishedNFTClicked.url,
),
assetType: easelProvider.publishedNFTClicked.assetType.toAssetTypeEnum()),
Column(
children: [
ClipRect(
child: ColoredBox(
color: Colors.black.withOpacity(0.3),
child: Padding(
padding: EdgeInsets.fromLTRB(20.w, 30.h, 0, 10.h),
child: Row(
children: [
IconButton(
onPressed: () {
Navigator.of(context).pop();
},
icon: Icon(
Icons.arrow_back_ios,
size: 22.h,
color: EaselAppTheme.kWhite,
),
],
),
),
Text(
kBack,
style: EaselAppTheme.titleStyle.copyWith(fontSize: 18.sp, color: EaselAppTheme.kWhite),
),
],
),
),
)
],
)
],
),
),
)
],
)
],
),
);
}

@override
void dispose() {
if (easelProvider.publishedNFTClicked.assetType == AssetType.Video.name &&
easelProvider.videoPlayerController.value.isInitialized) {
if (easelProvider.videoPlayerController.value.isPlaying) {
easelProvider.videoPlayerController.pause();
}
}
easelProvider.videoLoadingError = '';

super.dispose();
}
}

class PreviewNFTBuilder extends StatelessWidget {
Expand Down
Loading

0 comments on commit 03afe53

Please sign in to comment.