Code Monkey home page Code Monkey logo

flutter-demos's People

Contributors

smartherd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flutter-demos's Issues

getting issue in initialising initializeDatabase() method

The following NoSuchMethodError was thrown building NoteList(dirty, state: _NoteListState#e3e90):
The method 'initializeDatabase' was called on null.
Receiver: null
Tried calling: initializeDatabase()

The relevant error-causing widget was:
NoteList file:///E:/FlutterWorkspace/flutterfundoo/lib/services/authservice.dart:15:20
When the exception was thrown, this was the stack:
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:54:5)
#1 _NoteListState.updateListView (package:flutterfundoo/activated/note_list.dart:185:54)
#2 _NoteListState.build (package:flutterfundoo/activated/note_list.dart:23:7)
#3 StatefulElement.build (package:flutter/src/widgets/framework.dart:4612:27)
#4 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4495:15)

Instance members can't be accessed from a factory constructor.

https://github.com/smartherd/Flutter-Demos/blob/master/lib/utils/database_helper.dart

`class DatabaseHelper
{
DatabaseHelper _databaseHelper;
Database _database;

String noteTable = 'note_table';
String colId = 'id';
String colTitle = 'title';
String colDescreption = 'descreption';
String colDate = 'date';
String colPriorety = 'priorety';

DatabaseHelper._createInstance();

factory DatabaseHelper(){
if (_databaseHelper == null){
_databaseHelper = DatabaseHelper._createInstance();
}
return _databaseHelper;
}
}`

in the factory constructor, i get this error below.

{
"resource": "[......]/flutterapp/lib/utils/database_helper.dart",
"owner": "dart",
"code": "instance_member_access_from_factory",
"severity": 8,
"message": "Instance members can't be accessed from a factory constructor.",
"source": "dart",
"startLineNumber": 22,
"startColumn": 9,
"endLineNumber": 22,
"endColumn": 24,
"tags": []
}

what does this mean? and how to fix it?

'NoteDetail' isn't defined for the class 'NoteListState'.

I am getting this error:
'NoteDetail' isn't defined for the class 'NoteListState'.

  • 'NoteListState' is from 'package:notes/screens/note_list.dart' ('lib/screens/note_list.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'NoteDetail'.

The function where this error originates is this one:
void navigateToDetail(String title) {
Navigator.push(context, MaterialPageRoute(builder: (context) {
return NoteDetail(title);
}));
}
}

Exception thrown when saving the note

I keep getting the following exception when I try to save the note to the database:

E/flutter (18356): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: DatabaseException(table note_table has no column named description (code 1 SQLITE_ERROR[1]): , while compiling: INSERT INTO note_table (title, description, priority, date) VALUES (?, ?, ?, ?)) sql 'INSERT INTO note_table (title, description, priority, date) VALUES (?, ?, ?, ?)' args [frdf, hrdgy, 2, Mar 27, 2020]}

creating a database

how do i create a database inside the code instead of generate it from a keyboard input?

Looking up a deactivated widgets ancestor is unsafe

Hi, thanks for the wonderful tutorial.
I keep getting the error looking Up a deactivated widgets ancestor is unsafe. At this point the state of the element tree is no longer stable to safely refer to a widget's ancestor in it's dispose() method, save a reference to the ancestor by calling InheritFromWidgetOfExactType() in the widget's didChangeDependancies() method

This occurs during clicking save when creating a new note and it tries to pop back to the notelist view

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.