Skip to content

Instantly share code, notes, and snippets.

View rizkyhaksono's full-sized avatar
🏠
Working from home

Rizky Haksono rizkyhaksono

🏠
Working from home
View GitHub Profile
@rizkyhaksono
rizkyhaksono / loginMethod.dart
Created July 21, 2022 17:38
Login Method with API
var usernameController = TextEditingController();
var passwordController = TextEditingController();
Future<void> loginMethod() async {
if (usernameController.text.isNotEmpty && passwordController.text.isNotEmpty) {
var response = await http.post(
Uri.parse(
// your API
""),
body: ({