Upgrade Skill Di ITBOX Jadi Lebih Hemat
Special Diskon 50%
Sampai 16 November 2026!
Hari
Jam
Menit
Detik
GARUDABOX

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 38 total)
  • Author
    Posts
  • in reply to: range error index #193001
    Aris Sugiyono
    Participant

      gambar error

      in reply to: range error index #193000
      Aris Sugiyono
      Participant

        kendalanya saat membuat note baru serta edit note yang sudah ada, jika buat note baru data masuk ke firebase tapi tidak membuat id, jadi data yang di buat muncul di luar di firebase.

        in reply to: range error index #192999
        Aris Sugiyono
        Participant

          link githubnya coach
          github

          in reply to: error Bad state: Error: package has unmigrated dependencies. #190491
          Aris Sugiyono
          Participant

            solved couach..

            in reply to: databaseException( UNIQUE constraint failed #183583
            Aris Sugiyono
            Participant

              solved coach, terima kasih

              in reply to: error praktik SQLite part 2 #170970
              Aris Sugiyono
              Participant

                solved coach, terima kasih

                in reply to: error praktik SQLite part 2 #170518
                Aris Sugiyono
                Participant
                  in reply to: error praktik SQLite part 2 #170517
                  Aris Sugiyono
                  Participant

                    hasil

                    hallo coach, setelah saya coba hasilnya masih sama itu coach.

                    in reply to: error praktik SQLite part 2 #170489
                    Aris Sugiyono
                    Participant

                      hallo coach ada dua error berbeda
                      1. saat run pakai web base ( chrome ) errornya missingpluginexception ( no implementattion found for method getdatabasespath on channel com.tekartik.sqflite) sudah di restart masih tetep muncul

                      2. saat run pakai emulator android errornya masih sama databaseException(no such table: notes ( code 1 AQLITE_ERROR):, while compiling: SELECT* FORM notes) SQL ‘SELECT * FORM notes’ args

                      saya cantumkan githubnya coach
                      notes app

                      in reply to: error praktik SQLite part 2 #169892
                      Aris Sugiyono
                      Participant

                        siap coba saya lihat lagi videonya coach

                        in reply to: error praktik SQLite part 2 #169891
                        Aris Sugiyono
                        Participant
                          import 'package:notes_app/models/note.dart';
                          import 'package:path/path.dart';
                          import 'package:sqflite/sqflite.dart';
                          
                          class dataBaseHelper {
                            static const TABLE_NOTES = 'notes';
                            static const TABLE_NOTES_ID = 'id';
                            static const TABLE_NOTES_NOTE = 'note';
                            static const TABLE_NOTES_TITLE = 'title';
                            static const TABLE_NOTES_ISPINNED = 'iSPinned';
                            static const TABLE_NOTES_UPDATEDAT = 'updated_at';
                            static const TABLE_NOTES_CREATEDAT = 'created_at';
                          
                            static Future<Database> Init() async {
                              final dpPath = await getDatabasesPath();
                              return openDatabase(join(dpPath, 'notes.db'), version: 1,
                                  onCreate: (newDb, version) {
                                newDb.execute('''CREATE TABLE $TABLE_NOTES (
                          $TABLE_NOTES_ID TEXT PRIMARY KEY,
                          $TABLE_NOTES_TITLE TEXT,
                          $TABLE_NOTES_NOTE TEXT,
                          $TABLE_NOTES_ISPINNED INTEGER,
                          $TABLE_NOTES_UPDATEDAT TEXT,
                          $TABLE_NOTES_CREATEDAT TEXT,
                                )''');
                              });
                            }
                          
                            Future<List<Note>> GetAllNote() async {
                              final db = await dataBaseHelper.Init();
                              final results = await db.query('notes');
                          
                              List<Note> listNote = [];
                              results.forEach((data) {
                                listNote.add(Note.formDb(data));
                              });
                          
                              return listNote;
                            }
                          
                            Future<void> insertallNote(List<Note> listNote) async {
                              final db = await dataBaseHelper.Init();
                              Batch batch = db.batch();
                          
                              listNote.forEach((note) {
                                batch.insert('note', note.toDb());
                              });
                          
                              await batch.commit();
                            }
                          }
                          
                          in reply to: error blank saat klik simpan ( provider part 3 ) #130876
                          Aris Sugiyono
                          Participant

                            sudah sloved coach tidak jadi

                            in reply to: praktik provider par 3 ( error terakhir di rubah null ) #103521
                            Aris Sugiyono
                            Participant
                              in reply to: praktik provider par 3 ( error terakhir di rubah null ) #103520
                              Aris Sugiyono
                              Participant

                                hallo coach saya lampirkan di github ya untuk error saat input code updateAt tulisan ” terakhir di rubah null ” yang seharusnya ” terakhir dirubah 20 juli .. ”

                                in reply to: praktik provider par 3 ( error terakhir di rubah null ) #103316
                                Aris Sugiyono
                                Participant

                                  add_or_detail_screen.dart

                                  import 'package:flutter/material.dart';
                                  import 'package:intl/intl.dart';
                                  import 'package:praktik_state_management/models/note.dart';
                                  import 'package:praktik_state_management/provider/notes.dart';
                                  import 'package:provider/provider.dart';
                                  
                                  class addOrDetailScreen extends StatefulWidget {
                                    // const addNoteScreen({Key key}) : super(key: key);
                                    static const routeName = '/addOrDetalNoteScreen';
                                  
                                    @override
                                    State<addOrDetailScreen> createState() => _addOrDetailScreenState();
                                  }
                                  
                                  class _addOrDetailScreenState extends State<addOrDetailScreen> {
                                    Note _note =
                                        Note(id: null, title: '', note: '', updateAt: null, createAt: null);
                                  
                                    bool init = true;
                                  
                                    final _formKey = GlobalKey<FormState>();
                                  
                                    void submitNote() {
                                      _formKey.currentState.save();
                                      final now = DateTime.now();
                                      _note = _note.copyWith(updateAt: now, createAt: now);
                                      final notesProvider = Provider.of<Notes>(context, listen: false);
                                      notesProvider.addNote(_note);
                                      Navigator.pop(context);
                                      print(_note.note);
                                      print(_note.title);
                                    }
                                  
                                    @override
                                    void didChangeDependencies() {
                                      if (init) {
                                        String id = ModalRoute.of(context).settings.arguments as String;
                                        _note = Provider.of<Notes>(context).getNote(id);
                                        init = false;
                                      }
                                      super.didChangeDependencies();
                                    }
                                  
                                    @override
                                    Widget build(BuildContext context) {
                                      return Scaffold(
                                        appBar: AppBar(
                                            actions: [TextButton(onPressed: submitNote, child: Text('Simpan'))]),
                                        body: SingleChildScrollView(
                                          child: Container(
                                            padding: EdgeInsets.all(10),
                                            child: Form(
                                                key: _formKey,
                                                child: Column(
                                                  children: [
                                                    TextFormField(
                                                      initialValue: _note.title,
                                                      decoration: InputDecoration(
                                                          hintText: 'Judul', border: InputBorder.none),
                                                      onSaved: (value) {
                                                        _note = _note.copyWith(title: value);
                                                      },
                                                    ),
                                                    TextFormField(
                                                      initialValue: _note.note,
                                                      decoration: InputDecoration(
                                                          hintText: 'tulis catatan di sini!',
                                                          border: InputBorder.none),
                                                      onSaved: (value) {
                                                        _note = _note.copyWith(note: value);
                                                      },
                                                      maxLines: null,
                                                    ),
                                                    Text('terakhir dirubah ${_note.updateAt}'),
                                                  ],
                                                )),
                                          ),
                                        ),
                                      );
                                    }
                                  }
                                  
                                Viewing 15 posts - 16 through 30 (of 38 total)
                                Shopping cart0
                                There are no products in the cart!
                                Continue shopping