Skip to content

Instantly share code, notes, and snippets.

import 'package:flutter/material.dart';
import 'package:barcode_scan/barcode_scan.dart';
import 'package:flutter/services.dart';
class QrCodeScan extends StatefulWidget {
@override
_QrCodeScanState createState() => _QrCodeScanState();
}
class _QrCodeScanState extends State<QrCodeScan> {
import 'package:flutter/material.dart';
import 'package:scanner_qrcode/qrscanncode.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
CardView menu1=(CardView)findViewById(R.id.menu1Card);
menu1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i=new Intent(Menuutama.this,Profil.class);
startActivity(i);
}
});
CardView menu2=(CardView)findViewById(R.id.menu2Card);
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
<RelativeLayout
public class Loading extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.loading);
Loading();
}
void Loading(){
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
tools:context=".Menuutama">
<ImageView
<?php
if(isset($_POST["Send"])){
$email="email@gmail.com";//$_POST["tujuan"];
$id_user=$_POST["id_user"];
$sql1="select * from `$tbuser` where `email`='$email' ";
if(getJum($conn,$sql1)>0){
$d=getField($conn,$sql1);
$kode=$d["id_user"];
$nama=$d["nama_user"];
<form method="post">
<table width="562" id="id_request">
<tr>
<td height="42"><label for="tujuan">To </label>
<td><strong>:</strong><td colspan="2"><input name="tujuan" type="text" class="form-control" value="<?php echo $advertiser_email;?>" size="25" />
</td></tr>
<tr>
<td height="32"><td><td colspan="2">
<input name="Send" type="submit" id="Send" value="Send" />
</td></tr>
// Mengatur Dimensi center screen
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
int x = (dim.width - getSize().width)/2;
int y = (dim.height - getSize().height)/2;
setLocation(x, y);
//filter hanya huruf
public void FilterHuruf(KeyEvent a){
if(Character.isDigit(a.getKeyChar())){