# Question about models in Flutter

**URL:** <https://forum.freecodecamp.org/t/question-about-models-in-flutter/441587>\
**Category:** General\
**Created:** [January 20, 2021, 4:20am UTC](https://forum.freecodecamp.org/t/question-about-models-in-flutter/441587 "2021-01-20T04:20:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CodingOwl](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/codingowl/32/195801_2.png) [@CodingOwl](https://forum.freecodecamp.org/u/CodingOwl)\
**Post date:** [January 20, 2021, 4:20am UTC](https://forum.freecodecamp.org/t/question-about-models-in-flutter/441587/1 "2021-01-20T04:20:25Z")

</div>

hello everyone, i just wanted to ask since this thing got me confused, i am still beginner with OOP i started it with Java and now working with it in flutter, so basically when i use a model in flutter, am i using it to fetch data from an api or a web server, am i right? let’s say it’s like select … from … in SQL, is that right? for example here i have this model of location

```auto
import './location_fact.dart';

class Location {
  final String name;
  final String url;
  final List<LocationFact> facts;
  Location({this.name, this.url, this.facts});
}

```

so basically in `final name` and `final url` i am specifying which data to get from the api or the web server ( in the example i am just giving fake data which just data i am giving it manually without a third party api or web server ) so when i use these i am just like using select name, url from “apî” ? is that the deal here? and when i am using the Location({this.name, this.url, this.facts}) am i specifying which data this model will take as a parameter ? and when i am using final am i like referring to the data that it won’t be fetched again once it’s fetched? and when i am using `final list <LocationFact> facts;` am i specifying that this data is going to take the facts only from the list or what? i know this is overwhelming but i am really beginner with dart and flutter generally, i appreciate anyone’s help and thank you.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [July 21, 2021, 4:20pm UTC](https://forum.freecodecamp.org/t/question-about-models-in-flutter/441587/2 "2021-07-21T16:20:26Z")

</div>

Closed on July 21, 2021, 4:20pm UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
