parent
2b479b142b
commit
c56e8f1369
4 changed files with 44 additions and 5 deletions
@ -1,7 +1,13 @@ |
||||
# Fonts |
||||
|
||||
Flutter works with custom fonts and you can apply a custom font across an entire app or to individual widgets. |
||||
You can use custom fonts in your app by including the font file in your app's assets and specifying the font in your app's styles. To use a custom font: |
||||
|
||||
- Add the font files to your app's assets folder. |
||||
- In your pubspec.yaml file, specify the fonts under the flutter section |
||||
- In your app's styles, specify the font family |
||||
- Use the font in a Text widget |
||||
|
||||
Visit the following resources to learn more: |
||||
|
||||
- [Use a custom font](https://docs.flutter.dev/cookbook/design/fonts) |
||||
- [Font - Flutter](https://docs.flutter.dev/cookbook/design/fonts) |
||||
- [How to use custom fonts in Flutter](https://blog.logrocket.com/use-custom-fonts-flutter/) |
@ -1,7 +1,14 @@ |
||||
# Images |
||||
|
||||
Apps can include both code and assets. Flutter uses the pubspec.yaml file, located at the root of your project, to identify assets required by an app. |
||||
In Flutter, you can display images using the `Image` widget. There are several ways to add an image to your app: |
||||
|
||||
- Asset: Add the image to your app's assets and specify the asset path in the `Image` widget. |
||||
- Network: Display an image from a URL by specifying the URL in the `Image` widget. |
||||
- File: Display an image from a file by specifying the file path in the `Image` widget. |
||||
|
||||
The `Image` widget also accepts additional parameters such as `fit`, `width`, and `height` to control the size and scaling of the image. |
||||
|
||||
Visit the following resources to learn more: |
||||
|
||||
- [Adding assets and images](https://docs.flutter.dev/development/ui/assets-and-images) |
||||
- [Images in Flutter](https://docs.flutter.dev/cookbook/images) |
@ -1 +1,13 @@ |
||||
# Other file types |
||||
# Other File Types |
||||
|
||||
In Flutter, you can work with different file types besides images. Some common file types that you can use in Flutter include: |
||||
|
||||
1. Text files: You can read or write text files using the dart:io library. |
||||
2. JSON files: You can parse JSON data using the dart:convert library. |
||||
javascript |
||||
3. Audio and Video files: You can play audio and video files using the video_player and audioplayers packages. |
||||
4. PDF files: You can display PDF files using the pdf package. |
||||
|
||||
Learn more from the following links: |
||||
|
||||
- [File class](https://docs.flutter.dev/cookbook/lists/mixed-list) |
@ -1 +1,15 @@ |
||||
# Working with assets |
||||
# Working with Assets |
||||
|
||||
Assets are resources such as images, fonts, and other files that are included in your app. To use assets in Flutter, you need to specify them in your app's `pubspec.yaml` file and then access them in your code. |
||||
|
||||
Here's how to work with assets in Flutter: |
||||
|
||||
1. Add assets to your app's `pubspec.yaml` file: |
||||
2. Access assets in your code |
||||
|
||||
The `pubspec.yaml` file is used to manage dependencies, assets, and other settings in your Flutter app. The `flutter` section is used to specify assets that should be included with the app. The path specified in the `assets` section should be relative to the `pubspec.yaml` file. |
||||
|
||||
Learn more from the following links: |
||||
|
||||
- [Flutter Tutorial - Assets](https://www.youtube.com/watch?v=Hxh6nNHSUjo) |
||||
- [Adding Assets in Flutter](https://docs.flutter.dev/development/ui/assets-and-images) |
Loading…
Reference in new issue