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
if (imageText == "Karyawan"){ | |
Navigator.of(context).push(MaterialPageRoute(builder: (context) => | |
new Karyawan() | |
) | |
); | |
} |
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
Row( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: [ | |
Padding( | |
padding: const EdgeInsets.only(top: 20.0, right: 180.0), | |
child: Text("Input Data", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30),) | |
), | |
] | |
), | |
Padding( |
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 DropdownClass { | |
final int id; | |
final String value; | |
DropdownClass(this.id, this.value); | |
} |
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
final _ctrTxtName = TextEditingController(), | |
_ctrTxtPhone = TextEditingController(), | |
_ctrTxtEmail = TextEditingController(); | |
int _idDepartment, _idJabatan; | |
List<DropdownClass> _jabatan = new List<DropdownClass>(); | |
List<DropdownClass> _department = new List<DropdownClass>(); | |
@override | |
void initState() { |
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:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
class Karyawan extends StatefulWidget { | |
const Karyawan({Key key}) : super(key: key); | |
@override | |
_KaryawanState createState() => new _KaryawanState(); | |
} |
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:belajar_flutter_karywan_app/SplashScreen.dart'; | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override |
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 'dart:async'; | |
import 'package:belajar_flutter_karywan_app/main.dart'; | |
import 'package:flutter/material.dart'; | |
class SplashScreen extends StatefulWidget { | |
@override | |
_SplashScreenState createState() => new _SplashScreenState(); | |
} |
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
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
const cors = require('cors'); | |
require('dotenv').config(); | |
const app = express(); | |
app.use(cors()); | |
app.use(bodyParser.json()); |
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
module.exports = function(app) { | |
require("./employeeRouter")(app); | |
} |
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
module.exports = (app) => { | |
const employeeController = require("../controllers/employeeController"); | |
var router = require("express").Router(); | |
router.get("/", employeeController.getAll); | |
router.get("/:id", employeeController.getByID); | |
router.post("/", employeeController.insert); | |
router.put("/:id", employeeController.update); | |
router.delete("/:id", employeeController.delete); |