From the course: Flutter Essential Training: Build for Multiple Platforms
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Modeling entities in Dart - Flutter Tutorial
From the course: Flutter Essential Training: Build for Multiple Platforms
Modeling entities in Dart
- [Female Voice] Currently, our chat bubble is working with hard coded data. If you notice the text right here and the image right here. Which obviously was a temporary setup to get things rolling, but now we must introduce actual data coming from some source. In order to do that, this widget itself cannot hold any hard coded data. It should receive data from the parent, somehow. Well, there are a few ways to do this. For example, adding the variables in the constructor itself and providing the data from the parent. So, like right now we have message, but we can also add the final string image, URL, final string author name. But if we add more properties like timestamp, author, metadata, et cetera, it becomes hard to maintain the entire list. And this would also be hard to mark later. So, maybe can we create a class called chat message entities and add all the properties there. So, we can directly pass around the…
Contents
-
-
-
-
-
-
-
Organizing the styles and colors for the login page9m 9s
-
(Locked)
Organizing the styles and colors for the chat page4m 15s
-
(Locked)
Understanding the anatomy of a pubspec.yaml file5m 4s
-
(Locked)
Exploring pub.dev3m 24s
-
(Locked)
Plugins vs. packages2m 22s
-
(Locked)
Adding plugins to your app from pub.dev4m 29s
-
(Locked)
Adding packages from external sources6m 35s
-
(Locked)
Modeling entities in Dart7m 2s
-
(Locked)
Generics in Dart10m 40s
-
(Locked)
JSON: Serialization vs. deserialization2m 16s
-
(Locked)
Reading data from a JSON file13m 25s
-
(Locked)
Improving UI with box constraints4m 42s
-
(Locked)
Calling a parent class method from child class4m 30s
-
-
-
-