Skip to content

Instantly share code, notes, and snippets.

Avatar
Coding use Rubic's Cube

Muhammad Norzariman Razari shiburagi

Coding use Rubic's Cube
View GitHub Profile
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 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 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 event.dart
class Event {
String mSG;
String eVTID;
String iDUSER;
String eVTDETS;
String eVTDT;
String eVTTIMEFROM;
String eVTTIMETO;
String eVTSTAT;
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,
You can’t perform that action at this time.