Skip to content

Instantly share code, notes, and snippets.

View AyushBherwani1998's full-sized avatar
:octocat:
Focusing

Ayush Bherwani AyushBherwani1998

:octocat:
Focusing
View GitHub Profile
@AyushBherwani1998
AyushBherwani1998 / .md
Created January 2, 2026 05:42
README template

Please make sure to have the respective sections in README of your project.

Advanced Permissions Usage

Since the Hackathon is focused on the Advanced Permissions, make sure to include the links for the below code usage.

  1. Code usage link to request Advanced Permissions.
  2. Code usage link to redeeming Advanced Permissions.

Envio Usage

If you are applying for Envio track, please make sure to include the links for the below code usage. Also describe how are you using Envio.

const grantedPermissions = await walletClient.requestExecutionPermissions([{
// ...
permission: {
type: "erc20-token-periodic",
data: {
tokenAddress,
// 1 USDC in WEI format. Since USDC has 6 decimals, 10 * 10^6
periodAmount: parseUnits("10", 6),
// 1 day in seconds
periodDuration: 86400,
@AyushBherwani1998
AyushBherwani1998 / openapi.yaml
Created December 18, 2023 06:37
OpenAPI changes for dart sdk
openapi: 3.0.3
info:
title: MultiBaas API
version: '0.0'
contact:
name: Curvegrid
description: MultiBaas's REST APIv0.
servers:
- url: '{base_url}/api/v0'
variables:
import 'package:mixpanel_flutter/mixpanel_flutter.dart';
import 'package:unplash_sample/core/utils/target_platform_extended.dart';
import 'package:unplash_sample/dependency_injection.dart';
abstract class MixpanelConfig {
void trackImageDetaislsEvent(String photoId);
/// Helps us get the metrics of experimentation to analysis
@AyushBherwani1998
AyushBherwani1998 / custom_theme_sample.dart
Last active May 5, 2023 17:35
A sample to demostrate setting up a custom theme for the app
/// Code for setting up customTheme
class CustomThemeData extends Diagnosticable {
final Color varibaleName;
/// Other things can also come, apart from Color, like whole BoxDecoration,
/// padding, text styles etc for widgets. If you keep text style, you can
/// have custom styling for text defined at single place, and you can use like
/// CustomTheme.of(context).customTextStyle.
/// Similar to what we use Theme.of(context).textTheme.body
@AyushBherwani1998
AyushBherwani1998 / logs.txt
Created January 2, 2021 05:18
Error logs while trying to add MagicSDK in flutter plugin podspec and running the example
dyld: Symbol not found: _$s13MagicSDK_Web30C8ProviderP4send7request8responseyAA10RPCRequestVyqd__G_yAA0C8ResponseVyqd_0_GctSeRd__SERd__SeRd_0_SERd_0_r0_lFTq
Referenced from: /Users/ayushbherwani/Library/Developer/CoreSimulator/Devices/6890CBDE-BD2F-4CEA-BC58-51511E52EC07/data/Containers/Bundle/Application/C55A211A-0B71-4F15-BB2E-83C814EDAF55/Runner.app/Frameworks/MagicSDK.framework/MagicSDK
Expected in: /Users/ayushbherwani/Library/Developer/CoreSimulator/Devices/6890CBDE-BD2F-4CEA-BC58-51511E52EC07/data/Containers/Bundle/Application/C55A211A-0B71-4F15-BB2E-83C814EDAF55/Runner.app/Frameworks/MagicSDK_Web3.framework/MagicSDK_Web3
in /Users/ayushbherwani/Library/Developer/CoreSimulator/Devices/6890CBDE-BD2F-4CEA-BC58-51511E52EC07/data/Containers/Bundle/Application/C55A211A-0B71-4F15-BB2E-83C814EDAF55/Runner.app/Frameworks/MagicSDK.framework/MagicSDK
dyld: launch, loading dependent libraries
DYLD_SHARED_CACHE_DIR=/Users/ayushbherwani/Library/Developer/CoreSimulator/Caches/dyld/19G73/com.apple.CoreSimulator.
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
class ListTileThemeData extends Diagnosticable {
const ListTileThemeData({
this.dense,
this.shape,
this.selectedColor,
this.iconColor,
this.textColor,
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart';
void main() => runApp(MaterialApp(
home: MyApp(),
));
class MyApp extends StatefulWidget {
import 'package:flutter/material.dart';
final colorScheme = const ColorScheme.dark(
primary: Colors.red,
);
final colorSchemeLight = const ColorScheme.light(
primary: Colors.red
);
ISSUE: #50400
// If you run this code, you won't encounter the issue. It has a drawer and a Scaffold as mentioned. Hovering over the
// back button, places the tooltip at the expected position. However, the person has given reproducible code due to which I was
// able to reproduce the error. And the error is not because of Drawer, it because of the Navigator being inside the Row. If you remove
// the drawer and have a container, the tooltip move it's place. One more finding, it will move it's place to the right which is
// equivalent to the width of other widget in the Row. The person code is given in the issue which you can try out. Also, the issue is
// producible on the Android too.
import 'package:flutter/material.dart';