Skip to content

Instantly share code, notes, and snippets.

Avatar
Coding use Rubic's Cube

Muhammad Norzariman Razari shiburagi

Coding use Rubic's Cube
  • @kiplelive
  • Petaling Jaya, Selangor, Malaysia
View GitHub Profile
View pin_input.dart
import 'package:flutter/material.dart';
class PinInput extends StatefulWidget {
PinInput(
{Key key,
this.numberOfBlock = 6,
this.controller,
this.validator,
this.decoration,
this.keyboardType,
View event.dart
class Event {
String mSG;
String eVTID;
String iDUSER;
String eVTDETS;
String eVTDT;
String eVTTIMEFROM;
String eVTTIMETO;
String eVTSTAT;
View samplesolution.dart
Future<List> _getAllEvents(String lectid) async {
var url = "http://www.71slabsolution.com/appointmy/geteventslect.php";
final response = await http.post(url, body: {
"useridval": lectid.toString(),
});
List<Map> jsonData = json.decode(response.body);
List<Event> events = jsonData.map((data) => Event.fromJson(data));
View fix.dart
Future<List> _getAllEvents(String lectid) async{
var url = "http://www.71slabsolution.com/appointmy/geteventslect.php";
final response = await http.post(url,body: {
"useridval":lectid.toString(),
});
var jsonData = json.decode(response.body);
View JS-shortform.js
// String to Characters
const list = [..."abc"] //["a","b","c"]
// String to ASCII Code
const list = [..."abc"].map(e=>e.codeUnitAt()) //[97,98,99]
// Split String
const list = "a;b;c".split`;` //["a","b","c"]
// Join List
const string = ["a","b","c"].join`;` //"a;b;c"
View intercetop_app.dart
import 'package:dio/dio.dart';
class AppInteceptor extends Interceptor {
@override
void onRequest(RequestOptions options, RequestInterceptorHandler handler) {
options.headers.addAll({"Authorization": "bearer {{TOKEN}}"});
super.onRequest(options, handler);
}
}
View repositories-app.dart
import 'dart:developer';
import 'package:dio/dio.dart';
import 'package:flutter_network_call_with_auth/interceptor/app.dart';
class AppRepo {
AppRepo._();
static final AppRepo instance = AppRepo._();