Coder Social home page Coder Social logo

apress / practical-flutter Goto Github PK

View Code? Open in Web Editor NEW
126.0 12.0 89.0 6.13 MB

Source Code for 'Practical Flutter' by Frank Zammetti

Home Page: https://www.apress.com/9781484249710

License: Other

Dart 93.08% Java 0.45% Swift 0.33% Objective-C 0.34% Batchfile 0.01% JavaScript 4.89% HTML 0.51% Shell 0.38%

practical-flutter's Issues

Ajuste no pubspec.yaml

Bom dia !!!

Tive que ajustar o arquivo pubspec.yaml nas dependências para :
flutter_slidable: 0.5.4

Está dando erro Appointments.dart nas linhas : 

                         return Slidable(
                              actionPane: SlidableDrawerActionPane(),

image_picker: 0.6.3+4

Neste caso estava dando erro na compilação.

Workable Flutter_book code

Just started my journey in mobile development. I really like the book, but the code in it does not work because of null safety. Therefore, I corrected the code due to my abilities. Don't scold too much. But for those who are starting to learn Flutter, it's better to face what works.

https://github.com/DenisNaN/Flutterbook

AppointmentsEntry error during build

New to dart/flutter, so learning to debug with Android Studio. Interesting, but a bit confusing.
Using the git code, I have this error:
I/flutter (21442): ## AppointmentsEntry.build()
I/flutter (21442): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter (21442): The following NoSuchMethodError was thrown building AppointmentsEntry(dirty):
I/flutter (21442): The getter 'title' was called on null.
I/flutter (21442): Receiver: null
I/flutter (21442): Tried calling: title
I/flutter (21442):
I/flutter (21442): User-created ancestor of the error-causing widget was:
I/flutter (21442): IndexedStack file:///D:/FlutterProjects/flutter_book/lib/ap
pointments/Appointments.dart:38:18
I/flutter (21442):
I/flutter (21442): When the exception was thrown, this was the stack:
I/flutter (21442): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
I/flutter (21442): #1 AppointmentsEntry.build (package:flutter_book/appointments/AppointmentsEntry.dart:49:72)
I/flutter (21442): #2 StatelessElement.build (package:flutter/src/widgets/framework.dart:4026:28)
... etc...

I tried just plugging a hard coded value to the text element, but to no avail.
This section of AppointmentsEntry...
print("## AppointmentsEntry.build()");

// Set value of controllers.
_titleEditingController.text = appointmentsModel.entityBeingEdited.title;
_descriptionEditingController.text = appointmentsModel.entityBeingEdited.description;

... seems to be where the title element of appointmentsModel.entityBeingEdited is assigned. According to the next "up" stack entry, Object.noSuchMethod implies this data element is a method, or the idea of an "=" assignment is in valid. Counterintuitive, at best.

What am I missing here? I keep looking at the class definitions, but nothing bad jumps out at me.

Does this code for for others?

flutter_book not working, missing stuff

Using Android Studio to build the flutter_book project. Getting
Resolving dependencies...
Running Gradle task 'assembleDebug'...
C:\Users\roger\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:15: error: package android.support.annotation does not exist
import android.support.annotation.VisibleForTesting;
^
C:\Users\roger\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:16: error: cannot find symbol
import android.support.v4.app.ActivityCompat;
^
symbol: class ActivityCompat
location: package android.support.v4.app
C:\Users\roger\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:17: error: package android.support.v4.content does not exist
import android.support.v4.content.FileProvider;
^
C:\Users\roger\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerFileProvider.java:3: error: package android.support.v4.content does not exist
import android.support.v4.content.FileProvider;
^
C:\Users\roger\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerFileProvider.java:10: error: cannot find symbol
public class ImagePickerFileProvider extends FileProvider {}
^
symbol: class FileProvider
... and other errors. I suspect this has to do with an upgrade to flutter, dart, Android Studio or some such since the book version.
Any suggestions? Still rather new to flutter/dart.

Exception after Flutter Upgrade to 1.9

After the upgrade of Flutter to v1.9 I suddenly got this exception thrown that I didn't see before in your code that I didn't modify btw. Using Android Studio under Windows 10.

The following NoSuchMethodError was thrown building AppointmentsEntry(dirty):
The getter 'title' was called on null.
Receiver: null
Tried calling: title
User-created ancestor of the error-causing widget was:
IndexedStack file:///C:/Development/myFlutterProjects/flutter_book/lib/appointments/Appointments.dart:38:22

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.