Skip to content

Instantly share code, notes, and snippets.

View TobiCrackIT's full-sized avatar
🚀
Building

Oluwatobi Oluwatoyin TobiCrackIT

🚀
Building
View GitHub Profile
Container(
child: Column(
children: <Widget>[
TextFormField(
maxLines: 1,
obscureText: false,
autovalidate: false,
style: TextStyle(
fontSize: 18,
@TobiCrackIT
TobiCrackIT / gist:86b73b02654f94675e7a7a1461d8a599
Created April 20, 2020 21:39
Flutter Tutorial on the use of select widgets
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Custom5',
@TobiCrackIT
TobiCrackIT / add_trips_screen.dart
Created May 4, 2020 15:33
Trippas App- Screen 2
import 'package:flutter/material.dart';
class AddTripsScreen extends StatefulWidget {
@override
_AddTripsScreenState createState() => _AddTripsScreenState();
}
class _AddTripsScreenState extends State<AddTripsScreen> {
final departureTextController=TextEditingController();
@TobiCrackIT
TobiCrackIT / homepage.dart
Last active June 19, 2020 08:17
Flutter Github App+
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
class HomePage extends StatefulWidget {
@override
_HomePageState createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:githubapp/user.dart';
import 'package:url_launcher/url_launcher.dart';
import 'service.dart';
class HomePage extends StatefulWidget {
@override
_HomePageState createState() => _HomePageState();
}
@TobiCrackIT
TobiCrackIT / HealthContainer.dart
Last active October 24, 2020 19:55
Custom Container
import 'package:flutter/material.dart';
class HealthContainer extends StatelessWidget {
final String title;
final IconData icon;
final Color color;
final VoidCallback onPressed;
HealthContainer({this.title,this.onPressed,this.icon,this.color});
@override
@TobiCrackIT
TobiCrackIT / pagination.dart
Last active August 30, 2021 12:16
Pagination in Flutter App without using a package
import 'package:flutter/material.dart';
class PaginatedScreen extends StatefulWidget {
@override
_PaginatedScreenState createState() => _PaginatedScreenState();
}
class _PaginatedScreenState extends State<PaginatedScreen> {
int page = 1;
@TobiCrackIT
TobiCrackIT / keybase.md
Created November 2, 2021 03:17
Keybase GitHub Account Proof

Keybase proof

I hereby claim:

  • I am tobicrackit on github.

  • I am oluwatobig (https://keybase.io/oluwatobig) on keybase.

  • I have a public key ASBwKAoJSyaAMIHzt522Y9ccvuxIUay5odt6k5DUaxcS4wo

@TobiCrackIT
TobiCrackIT / solid_bank.sol
Created April 24, 2022 19:37
Savings Smart Contract using Compound
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
interface cETH {
function mint() external payable; // to deposit to compound
function redeem(uint redeemTokens) external returns (uint); // to withdraw from compound
pragma solidity >=0.7.0 <0.9.0;
contract RaceToken {
string _name = "Race Token";
string _symbol = "RCT";
address deployer;
mapping(address => uint) balances;
mapping(uint => bool) blockMined;