Skip to content

Instantly share code, notes, and snippets.

View iampawan's full-sized avatar
🎯
I may be slow to respond.

Pawan Kumar iampawan

🎯
I may be slow to respond.
View GitHub Profile
@iampawan
iampawan / main.dart
Last active December 6, 2023 08:11
Generated code from PixelGennie
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@iampawan
iampawan / appbaroverlap.dart
Last active September 14, 2021 10:21
AppBar Overlaps with Grid using Scroll Controller and Stack
// 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';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
id title
card
Card

VelocityX allows you to quicky create a card using .card() extension or VxCard() widget. You can eaily modify the properties like Shadow Color, Elevation, and Clip of VelocityX Card using different extensions

:::important

  • You can either use this or Card() widget.
void main() {
const number = 5;
addBy2(int inputNumber) {
var result = inputNumber + 2;
return result;
}
var output = addBy2(number);
var newOutput = addBy2(10);
void main() {
final myNumbers = [11,25,87,127,10,55,67,38,52,119,131,99];
// Rookie Way
num sum = 0;
for (int i = 0; i < myNumbers.length; i++) {
sum += myNumbers[i];
void main() {
const int flagOffset = 0x1F1E6;
const int asciiOffset = 0x41;
final codeToCountryEmoji = (code) {
final char1 = code.codeUnitAt(0) - asciiOffset + flagOffset;
final char2 = code.codeUnitAt(1) - asciiOffset + flagOffset;
return String.fromCharCode(char1) + String.fromCharCode(char2);
};
@iampawan
iampawan / sample.dart
Created December 6, 2019 18:38
Keyboard freeze issue.
import 'package:flutter/material.dart';
class AliceExample extends StatefulWidget {
@override
_AliceExampleState createState() => _AliceExampleState();
}
class _AliceExampleState extends State<AliceExample> {
TextEditingController _textController;
FocusNode focusNode;
import 'package:flutter/material.dart';
class AddDetails extends StatefulWidget {
final String place_id;
final String name;
AddDetails(this.place_id, this.name);
@override
_AddDetailsState createState() => _AddDetailsState();
}
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:http/http.dart' as http;
import 'package:qart/services/network_service_response.dart';
class RestClient {
Map<String, String> authHeaders;
@iampawan
iampawan / stackoverflow.py
Created April 21, 2019 06:00
Stack Overflow Questions Scrapping
import requests
from bs4 import BeautifulSoup
import json
res = requests.get("https://stackoverflow.com/questions")
soup = BeautifulSoup(res.text, "html.parser")
questions_data = {
"questions": []