Skip to content

Commit 3448d17

Browse files
committed
Update Flutter.md
Fixed Numbered List and readability.
1 parent 31c17a1 commit 3448d17

1 file changed

Lines changed: 15 additions & 10 deletions

File tree

docs/Framework/Flutter/Flutter.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,30 @@ has_children: false
1414
You get a widget, you get a widget, everyone gets a widget!
1515
Flutter is an open-source UI software development kit created by Google. It allows developers to build natively compiled applications for mobile, web, and desktop from a single codebase. Flutter uses the Dart programming language and provides its own widgets, which makes it highly customizable and efficient.
1616

17-
### 1) Widget-Based Architecture
17+
---
18+
19+
1. **Widget-Based Architecture**
1820

19-
- In Flutter, everything is a widget. This is a core principle of the framework that allows for highly customizable and reusable UI components.
20-
- Widgets are used to define the structure and appearance of the UI, and Flutter provides a rich set of pre-built widgets that can be used to compose the UI.
21+
- In Flutter, everything is a widget. This is a core principle of the framework that allows for highly customizable and reusable UI components.
22+
- Widgets are used to define the structure and appearance of the UI, and Flutter provides a rich set of pre-built widgets that can be used to compose the UI.
2123

22-
### 2) State Management
24+
2. **State Management**
2325

24-
- This is a crucial aspect of any Flutter application. There are various strategies for managing state in Flutter, such as Provider, Riverpod, Bloc, etc.
25-
- State management is a complex topic, and there is no one-size-fits-all solution. The best approach depends on the size and complexity of the application.
26+
- This is a crucial aspect of any Flutter application. There are various strategies for managing state in Flutter, such as Provider, Riverpod, Bloc, etc.
27+
- State management is a complex topic, and there is no one-size-fits-all solution. The best approach depends on the size and complexity of the application.
2628

27-
### 3) Hot Reload & Hot Restart
29+
3. **Hot Reload & Hot Restart**
2830

29-
- Flutter's hot reload feature allows developers to quickly and easily experiment, build UIs, add features, and fix bugs.
30-
- Hot reload injects updated source code files into a running Dart Virtual Machine (VM). This allows you to quickly view the effects of your changes without restarting the app.
31+
- Flutter's hot reload feature allows developers to quickly and easily experiment, build UIs, add features, and fix bugs.
32+
- Hot reload injects updated source code files into a running Dart Virtual Machine (VM). This allows you to quickly view the effects of your changes without restarting the app.
3133

3234
---
3335

3436
## Examples
3537

36-
Here are some simple example problems that explore making a coffee. Here is some example dart code:
38+
Here are some simple example problems that explore making a coffee.
3739

40+
{: .code title="Example"}
3841
```dart
3942
class CoffeeMaker {
4043
void makeCoffee() {
@@ -68,6 +71,7 @@ class CoffeeMaker {
6871

6972
In this example, we have two widgets: `MyApp` and `MyHomePage`. `MyApp` is the root widget of the application and `MyHomePage` is a child widget. Each widget has a build method that describes the part of the user interface the widget represents. Widgets are composed together to build the complete UI. For example, `MyHomePage` uses `Scaffold`, `AppBar`, `Center`, `Column`, `Text`, and `FloatingActionButton` widgets to define its UI. This is a fundamental aspect of Flutter's widget-based architecture: complex UIs are built by composing a number of simpler widgets.
7073

74+
{: .code title="Example"}
7175
```dart
7276
import 'package:flutter/material.dart';
7377
@@ -129,6 +133,7 @@ class MyHomePage extends StatelessWidget {
129133

130134
In this example, we use the `Provider` package for state management with a `Counter` class that notifies listeners of changes. The `ChangeNotifierProvider` makes an instance of `Counter` available to the widget tree, allowing any widget to listen for changes. The `Consumer` widget then rebuilds the UI whenever the `Counter` changes, demonstrating how Flutter allows widgets to react and rebuild when the state changes.
131135

136+
{: .code title="Example"}
132137
```dart
133138
import 'package:flutter/material.dart';
134139
import 'package:provider/provider.dart';

0 commit comments

Comments
 (0)