This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Event { | |
String mSG; | |
String eVTID; | |
String iDUSER; | |
String eVTDETS; | |
String eVTDT; | |
String eVTTIMEFROM; | |
String eVTTIMETO; | |
String eVTSTAT; |
NewerOlder