Bài đăng

Quick Menu

Danh sách các bài viết tổng hợp

I, Flutter: ·        Flutter 1.1 - Flutter là gì :  https://loctvt.blogspot.com/2021/06/flutter-1-flutter-la-gi.html ·        Flutter 1.2 - Flutter Architecture:  https://loctvt.blogspot.com/2021/06/flutter-12-flutter-architecture.html ·        Flutter 1.3 - Flutter & Dart biên dịch sang Native app như thế nào ?   :  https://loctvt.blogspot.com/2021/06/flutter-13-flutter-dart-bien-dich-sang.html ·        Flutter 1.4 -  Lộ trình học Flutter:  https://loctvt.blogspot.com/2021/07/flutter-14-lo-trinh-hoc-flutter.html   ·        Flutter 2.1 - Tổng quan về các file auto generated khi tạo mới project Flutter:  https://loctvt.blogspot.com/2021/07/tong-quan-ve-cac-file-auto-generated.html ·        Flutter 2.2 - Dart Basics:  https://loctvt.blogspot.com/2021/07/dart-basic...

Swift UI : ScrollView vs List

Hình ảnh
ScrollView                          ScrollView {                              Text ( "Alo" )                              Text ( "Alo" )                              Text ( "Alo" )                              Text ( "Alo" )                              Text ( "Alo" )                              Text ( "Alo" )                              Text ( "Alo" )               ...

Swift UI note

SwiftUI uses Declarative Syntax. Swift uses Imperative Syntax. Declarative Syntax lets you specify what you want to be created and the system decides how to do it. Imperative Syntax forces you to describe exactly how you want an interface item to be created. Zstack, Vstack, Zstack       ZStack {             Color . accentColor                 . ignoresSafeArea ()             HStack ( spacing : 20 ){                 Text ( "Demo" ). scaledToFit (). frame ( width : 100 , height : 100 , alignment : . center ). border (. red )                 VStack ( alignment : . trailing , spacing : 30 ){                     Text ( "Tomato Tortellini, Bottarga and Carbonara " ). font (. title3 )                    ...

Swift UI : Observable, Observed, State and Binding

State and Binding @State and @Binding are used when you need to pass a variable to another view.   struct ContentView : View { @State var showLogo = true var body : some View { VStack { if showLogo { LittleLemonLogo (bindingVariable : $showLogo) } } } } @State to controlling a variable "showLogo" struct LittleLemonLogo : View { @Binding var bindingVariable : Bool var body : some View { VStack { Image ( "littleLemonLogo" ) Button (action : { bindingVariable. toggle () } , label : { Text ( "Toggle Logo Visibility" ) . font (. title2 ) }) } } } A Boolean variable named bindingVariable of type @Binding is created on line 1 . This variable will receive the state of ContentView 's showLogo variable and will be tied to it, meaning, that any ...

IOS app cheat sheet

Hình ảnh
Project files Learning objective: Identify useful files and directories you can access with Project View. To access the entire file structure of a project including all files hidden within folders from the XCode view, select Project from the tab at the top of the Project window. Choosing Project View allows you to see a lot more files and directories. The most important of these are: module-name/ AppDelegate The app delegate is effectively the root object of your app, and it works in collaboration with UIApplication to manage some user interactions with the system. SceneDelegate What is displayed on the screen is the responsibility of SceneDelegate. ViewController The View Controller is the parent of all the views present on a storyboard. Each application has at least one ViewController. It facilitates the transition between various parts of the user interface. Main With the Main.storyboard file you can lay out and design the user interface of your application by adding views such as b...

[Flutter]-Single stream vs broadcast stream

Single   stream and a broadcast stream may seem very similar, as both examples use a StreamController to emit values and a StreamBuilder widget to listen to the stream and update the UI. The main difference between a single stream and a broadcast stream is not in the way we create or use the StreamController, but in how the stream is listened to by listeners. In the case of a single stream, only one listener can be actively subscribed to the stream at any given time, while in the case of a broadcast stream, multiple listeners can be subscribed to the stream at the same time. Here's an example that demonstrates the difference more clearly: Let's say we want to create an app that displays a live feed of a chat room. Using a single stream, we can have only one user listening to the chat room feed at a time, which means that only one user will be able to see the messages that are sent. On the other hand, if we use a broadcast stream, we can have multiple users listening to the chat...