Skip to content

Instantly share code, notes, and snippets.

View maheshmnj's full-sized avatar
💭
Bring it on 🔥

Mahesh Jamdade maheshmnj

💭
Bring it on 🔥
View GitHub Profile
@maheshmnj
maheshmnj / rotate.dart
Created April 20, 2021 07:54
rotate a box by x deg every 2 secs
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
import 'dart:math' as math;
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@maheshmnj
maheshmnj / life_cycle.dart
Created April 18, 2021 18:31
Resuming futter lifecycle
import 'package:flutter/material.dart';
class CountdownTimer extends StatefulWidget {
@override
_CountdownTimerState createState() => _CountdownTimerState();
}
class _CountdownTimerState extends State<CountdownTimer>
with WidgetsBindingObserver, SingleTickerProviderStateMixin {
double countdownTime;
@maheshmnj
maheshmnj / image_picker.dart
Last active July 23, 2021 12:35
image picker: ^0.8.2 sample against the issue https://github.com/flutter/flutter/issues/48016
import 'dart:io';
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@maheshmnj
maheshmnj / contacts.vcf
Last active March 31, 2021 10:10
Sample contacts to import and use for testing (Successfully imported on pixel3a)
BEGIN:VCARD
VERSION:3.0
N:Muller;Isabella;;;
FN:Isabella Muller
ORG:Bubba Gump Shrimp Co.
TITLE:Shrimp Man
PHOTO;MEDIATYPE=image/gif:http://www.example.com/dir_photos/my_photo.gif
TEL;TYPE=work,voice;VALUE=uri:tel:+16829185770
REV:20080424T195243Z
END:VCARD
@maheshmnj
maheshmnj / HorizontalListWheelScrollView.dart
Last active April 10, 2022 07:27
Flutter Horizontal Listwheel Scroll View
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@maheshmnj
maheshmnj / otp.md
Last active April 19, 2021 13:24
Auto Fill otp using sms_auto_fill flutter package
  1. Add the dependency https://pub.dev/packages/sms_autofill
  2. your class must implement the mixi CodeAutoFill mixin
  3. in initstate you should generate the app Signature and listen for the code
@override
  void initState() {
    listenForCode();
      SmsAutoFill().getAppSignature.then((signature) {
 setState(() {

Facebook Sign In hash

Release hash

C:\Users\Mahesh Jamdade>keytool -exportcert -alias <aliasName> -keystore <PATH> | openssl sha1 -binary | openssl base64
XOQ*****************vReGc=

source: https://stackoverflow.com/a/18101444/8253662

@maheshmnj
maheshmnj / adb.md
Last active November 8, 2023 18:29
Adb Push file to phone from laptop

adb push (Send data from Desktop to Target phone)

adb push ~/Desktop/notifications.drawio ./storage/emulated/0/Download
e.g
$ adb push ~/Documents/workspace/mobile-app/build/app/outputs/flutter-apk/app-release.apk ./storage/emulated/0/Download

image

@maheshmnj
maheshmnj / release.md
Last active July 11, 2021 13:46
Signing a android app with a releaseKey

Before following the below steps generate a key.jks file using this command source

MacOs/Linux

keytool -genkey -v -keystore ~/<path where key needs to be generated>.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload

Windows

keytool -genkey -v -keystore c:\Users\USER_NAME\upload-keystore.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias upload