Skip to content

Instantly share code, notes, and snippets.

View bharathraj-e's full-sized avatar
🦊

Bharathraj bharathraj-e

🦊
View GitHub Profile
BlockQuote(
child:
Text(
'Lorem ipsum dolor sit amet, is the best place to hide a text.',
textAlign: TextAlign.justify,
),
),
@bharathraj-e
bharathraj-e / request.dart
Last active September 15, 2020 08:55
Flutter http request simplified
import 'dart:convert';
import 'package:http/http.dart' as http;
const String _host = "https://<....>";
class MyRequest {
final String url;
final Map<String, String> headers = {'Authorization': 'Bearer token'};
@bharathraj-e
bharathraj-e / main.dart
Last active May 22, 2022 05:50
Expansion panel - single expanded
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
static const String _title = 'Flutter Code Sample';
@override
@bharathraj-e
bharathraj-e / prefs.dart
Last active February 4, 2023 09:55
flutter shared preferences singleton shortcut for set and get
import 'package:shared_preferences/shared_preferences.dart';
class Prefs {
static SharedPreferences _prefs;
// call this method from iniState() function of mainApp().
static Future<SharedPreferences> init() async {
_prefs = await SharedPreferences.getInstance();
return _prefs;
@bharathraj-e
bharathraj-e / jira-board.dart
Created April 12, 2023 18:26
Kanban board / jira borad basic ui in flutter
Scaffold(
appBar: AppBar(
title: const Text('Jira Board'),
),
body: Column(
children: [
Expanded(
child: Row(
children: [
Expanded(
import 'package:flutter/material.dart';
class GameButton extends StatelessWidget {
const GameButton({required this.child, this.color, this.height = 56, this.width, required this.onTap, super.key});
final Widget child;
final Color? color;
final double height;
final double? width;
final VoidCallback onTap;