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
//fungsi untuk return image list carousel | |
List<Widget> listImage(List list){ | |
var obj = list.map((url){ | |
return Container( | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
ClipRRect( | |
child: InkWell( | |
onTap: (){ |
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:carousel_slider/carousel_slider.dart'; | |
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
class SliderShowFullmages extends StatefulWidget{ | |
final List listImagesModel; | |
final int current; | |
const SliderShowFullmages({ Key key, this.listImagesModel, this.current }) : super(key: key); | |
@override | |
_SliderShowFullmagesState createState() => _SliderShowFullmagesState(); | |
} |
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
void response(query) async { | |
_textController.clear(); | |
df.AuthGoogle authGoogle = | |
await df.AuthGoogle(fileJson: 'assets/credential-dialogflow.json').build(); | |
df.Dialogflow dialogflow = | |
df.Dialogflow(authGoogle: authGoogle, sessionId: '123456'); | |
df.DetectIntentResponse response = await dialogflow.detectIntentFromText(query, "id"); | |
ChatMessage message = new ChatMessage( | |
text: response.queryResult.fulfillmentText, | |
name: 'Munaroh', |
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_dialogflow_v2/flutter_dialogflow_v2.dart' as df; | |
import 'package:flutter/material.dart'; | |
class ChatbotDialogflow extends StatefulWidget { | |
ChatbotDialogflow({Key key, this.title}) : super(key: key); | |
final String title; | |
@override | |
_ChatbotDialogflowState createState() => new _ChatbotDialogflowState(); | |
} | |
class _ChatbotDialogflowState extends State<ChatbotDialogflow> { | |
final List<ChatMessage> _messages = <ChatMessage>[]; |
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 'dart:io' as io; | |
import 'package:belajar_flutter_karywan_app/Model/KaryawanModel.dart'; | |
import 'package:path/path.dart'; | |
import 'package:sqflite/sqflite.dart'; | |
import 'package:path_provider/path_provider.dart'; | |
class DbLite{ | |
static final DbLite _instance = new DbLite.internal(); |
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<int> deleteKaryawan(id) async{ | |
var dbClient = await db; | |
int res = await dbClient.delete("Karyawan", where: "id = ?", whereArgs: [id]); | |
return res; | |
} |
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
//fungsi save | |
void _deleteKaryawan(KaryawanModel model){ | |
final db = new DbLite(); | |
PopupHelper().alertDialogCuprtino(context, "Mohon tunggu..."); | |
Future.delayed( Duration(seconds: 3), (){ | |
db.deleteKaryawan(model.id).then((value){ //hapus data yg ada di database | |
if(value > 0){ | |
setState(() { | |
modelList.remove(model); //hapus data yg ada di list | |
}); |
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
Column( | |
children: [ | |
Padding( | |
padding: EdgeInsets.all(5), | |
child: Padding( | |
padding: EdgeInsets.only(top: 20, left: 20, bottom: 20), | |
child: Row( | |
children: [ | |
Icon(Icons.view_list, color: Colors.grey), | |
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
import 'package:belajar_flutter_karywan_app/MainMenu.dart'; | |
import 'package:belajar_flutter_karywan_app/Model/KaryawanModel.dart'; | |
import 'package:belajar_flutter_karywan_app/Repository/DbLite.dart'; | |
import 'package:belajar_flutter_karywan_app/WidgetHelper/PopupHelper.dart'; | |
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
import 'package:flutter_slidable/flutter_slidable.dart'; | |
class KaryawanReport extends StatefulWidget { |
NewerOlder