Commit a548bc06 authored by khairullah zikri's avatar khairullah zikri
Browse files

Add json

parent 100152be
import 'package:flutter/material.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter/services.dart';
import 'dart:convert';
class Json extends StatelessWidget {
Widget build(BuildContext context) {
return Container(
child: RaisedButton(
child: Text("simpan"),
onPressed: _prosesSimpan,
void _prosesSimpan() async {
final db = Firestore.instance;
String jsonString = await rootBundle.loadString('assets/pokedex.json');
List pokedex = json.decode(jsonString);
print('end proses data');
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment