Skip to content

Instantly share code, notes, and snippets.

View hafidalim's full-sized avatar
🎯
Focusing

Hafid Ali Mustaqim hafidalim

🎯
Focusing
  • Indonesia
View GitHub Profile
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'package:parsingdata_flutter/detail_page.dart';
import 'package:parsingdata_flutter/model/model_users.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/img_item"
android:layout_width="120dp"
android:src="@mipmap/ic_launcher"
import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
void main() {
runApp(MaterialApp(
home: Login(),
<?php
require "connect.php";
if($_SERVER['REQUEST_METHOD'] == "POST"){
$response = array();
$email = $_POST['email'];
$password = md5($_POST['password']);
$cek = "SELECT * FROM users WHERE email='$email' and password='$password'";
<?php
define('HOST', 'localhost');
define('USER', 'root');
define('PASS', '');
define('DB', 'db_latihan');
$con = mysqli_connect(HOST, USER, PASS, DB) or die('tidak bisa konek');
?>
dependencies{
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.squareup.retrofit2:retrofit:2.6.1'
implementation 'com.squareup.retrofit2:converter-gson:2.6.1'
implementation("com.squareup.okhttp3:logging-interceptor:4.2.0")
implementation "org.jetbrains.anko:anko:0.10.8"
implementation "org.jetbrains.anko:anko-commons:0.10.8"
}