Skip to content

Instantly share code, notes, and snippets.

View shiburagi's full-sized avatar
Coding use Rubic's Cube

Muhammad Norzariman Razari shiburagi

Coding use Rubic's Cube
  • Petaling Jaya, Selangor, Malaysia
View GitHub Profile
import 'dart:developer';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class PinInput extends StatefulWidget {
PinInput(
{Key? key,
this.numberOfBlock = 6,
this.controller,
class Event {
String mSG;
String eVTID;
String iDUSER;
String eVTDETS;
String eVTDT;
String eVTTIMEFROM;
String eVTTIMETO;
String eVTSTAT;
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));
@shiburagi
shiburagi / fix.dart
Last active September 22, 2019 15:53
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);
// 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"
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);
}
}
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._();
fn=(delay=5,rands=[20,10,15])=>{
if(!loop) return;
console.log("click")
document.dispatchEvent(new Event('keydown', {keyCode: 'a'}))
setTimeout(fn, rands.reduce((s,v)=>s+Math.random()*v) +5);
}
startFn=()=>{
loop = true
fn()
}
Widget build(BuildContext context) {
String loadUrl =
"https://www.thevocket.com/rakaman-mak-cik-ini-terpaksa-langgar-axia-untuk-keluar-parkir-curi-tumpuan-ramai/";
return Scaffold(
appBar: AppBar(
// Here we take the value from the MyHomePage object that was created by
// the App.build method, and use it to set our appbar title.
title: Text(widget.title),
),
body: WebView(
<div style="display: flex;">
<img src="https://images.dattel.asia/i/mybox.png" alt="Malaysia" width="45" height="30">
<a href="https://images.dattel.asia/d/behave-arch2.pdf" target="_blank" style="margin: auto 8px auto;">
30 Behaviour Archetypes
</a>
</div>
<div style="display: flex;">
<img src="https://images.dattel.asia/i/thbox.png" alt="Thailand" width="45" height="30">
<a href="https://images.dattel.asia/d/behave-arch2.pdf" target="_blank" style="margin: auto 8px auto;">
30 Behaviour Archetypes