原创 Dart數據類型詳解 int 、double、String、bool、List、Map

//可以用is 來判斷類型 void main() { //字符串類型,可以用單引號,也可以用雙引號,也可以用三個單引號或者三個雙引號 var str = '你好Dart'; var s = "你好Dart";

原创 自定義View -屬性動畫Property Animation

ViewPropertyAnimator package com.zhoujian.retrofit.activity; import android.animation.Animator; import android.animat

原创 Dart中的函數、函數的定義、可選參數、默認參數、命名參數

void main() { print("調用系統內置方法"); //無返回值調用方法 sayHello(); print("--------------------"); //有返回值 var n = ge

原创 Dart 中的庫、自定義庫、系統庫、第三方庫

void main(){ //通過import 引入庫 //Dart中的庫主要有三中 //1、自定義庫 import 'lib/xxx.dart' //2、系統內置庫 import ‘dart:io’; //3、p

原创 Kotlin 總結學習,溫故知新

1.kotlin中函數 (1) kotlin中函數以fun關鍵字開頭 (2) 返回值類型寫在函數名後面 (3) java中無返回值是void,kotlin中無返回值是Unit (4) 函數參數的寫法是:參數名:參數名類型 (5) 函數可以

原创 Kotlin基礎之枚舉和when

  1.申明枚舉類 package com.zhoujian.kotlindemo.shaps enum class Color { RED,YELLOW,GREEN,WHITE } Kotlin申明美枚舉類用了enum、cl

原创 Kotlin基礎之函數和變量

1. 函數 fun max(a: Int, b: Int): Int { return if (a > b) a else b } 函數聲明以關鍵字fun開始,函數名稱max   在kotlin中,if是表達式,不

原创 Kotlin基礎之迭代事物:while循環和for循環

Kotlin的while循環和Java完全一樣 1.while循環 Kotlin中有while循環和do while循環 //condition 爲true 執行循環體 while (condition)

原创 英語經典句子

Good manners are free,but the absence of good manners may cost you dearly. 禮貌是免費的,但不禮貌的代價將是昂貴的。

原创 協程實戰

添加對協程的依賴 //協程依賴 implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.5' implementation 'org.jetbrai

原创 Kotlin 擴展庫KTX

首先給出文檔地址: Doc:https://android.github.io/android-ktx/core-ktx/ Github:https://github.com/android/android-ktx   添加依賴:

原创 Flutter 網絡請求

Flutter中第三方網絡請求庫http https://github.com/zeke123/http pubspec.yaml dependencies: http: ^0.12.0+2 import 'package:htt

原创 Dart中的類、對象

Person.dart //定義Person類 class Person { //屬性 String name; int age; //默認構造函數 Person(String name, int age) {

原创 自定義view繪製練習之繪製柱狀圖

package com.zhoujian.retrofit.view; import android.content.Context; import android.graphics.Canvas; import android.gra

原创 Dart中的函數箭頭函數、匿名函數、閉包等

main() { //箭頭函數,箭頭函數後面只能寫一行代碼 List list = ["中國人", "美國人", "德國人"]; list.forEach((value) => print(value)); print(