首页
最新

Flutter3.0开发环境的配置

Flutter是Google推出的一款跨平台移动应用开发框架,支持iOS、Android、Web、Windows、macOS和Linux等多个平台。为了使用Flutter进行开发,首先需要配置Flutter开发环境。 本文将详细介绍Flutter3.0开发环境的配置方法: 一、安装Flutter SDK Flutter SDK是Flutter开发的核心工具,需要首先下载并安装。Flutter SDK支持Windows、macOS和L
发布于 2023-3-9 下午11:57 阅读数 1334

dart DateTime 类的特性属性

year 年 final moonLanding = DateTime.parse('2023-02-08 20:18:04Z'); print(moonLanding.year); // 2023 month 月 final moonLanding = DateTime.parse('2023-02-08 20:18:04Z'); print(moonLanding.month); // 2
发布于 2023-2-8 下午11:47 阅读数 823

Dart DateTime.add 方法

用法 DateTime add( Duration duration ) 返回一个新的 DateTime 实例,其中 duration 添加到 this 。 final today = DateTime.now(); print(today);//2023-01-31 18:43:07.496521 final fiftyDaysFromNow = today.add
发布于 2023-1-31 下午6:43 阅读数 769

Dart DateTime.toIso8601String 方法

用法 String toIso8601String() 返回 ISO-8601 full-precision 扩展格式表示。 UTC 时间的格式为 yyyy-MM-ddTHH:mm:ss.mmmuuuZ,本地/非 UTC 时间的格式为 yyyy-MM-ddTHH:mm:ss.mmmuuu(无尾随 "Z"),其中: yyyy 如果年
发布于 2023-1-31 下午6:40 阅读数 754

Dart DateTime.compareTo 方法

用法 int compareTo( DateTime other ) override 将此 DateTime 对象与 other 进行比较,如果值相等则返回零。 compareTo 函数返回: 如果此 DateTime isBefore other 为负值。 0 如果这个 DateTime isAtSameMomentAs ot
发布于 2023-1-31 下午6:36 阅读数 811

Dart DateTime.difference 方法

用法 Duration difference( DateTime other ) 返回 Duration 与从 this 中减去 other 时的差值。 如果 other 出现在 this 之后,则返回的 Duration 将为负数。 final moonLanding = DateTime.parse('2023-01-31 20:18:0
发布于 2023-1-31 下午6:31 阅读数 935

Dart DateTime.isAtSameMomentAs 方法

用法 bool isAtSameMomentAs( DateTime other ) 如果 this 与 other 发生在同一时刻,则返回 true。 比较与时间是 UTC 还是本地时区无关。 final now = DateTime.now(); final later = now.add(const Duration(seconds:
发布于 2023-1-31 下午6:22 阅读数 719

Dart DateTime.isAfter 方法

用法 bool isAfter( DateTime other ) 如果 this 出现在 other 之后,则返回 true。 比较与时间是 UTC 还是本地时区无关。 final now = DateTime.now(); final later = now.add(const Duration(seconds: 5)); print(lat
发布于 2023-1-31 下午6:17 阅读数 757

Dart DateTime.isBefore方法

用法 bool isBefore( DateTime other ) 如果 this 出现在 other 之前,则返回 true。 比较与时间是 UTC 还是本地时区无关。 final now = DateTime.now(); final earlier = now.subtract(const Duration(seconds: 5)); p
发布于 2023-1-31 下午6:12 阅读数 803

Dart DateTime.subtract方法

用法 DateTime subtract( Duration duration ) 返回一个新的 DateTime 实例,其中 duration 从 this 中减去。 final today = DateTime.now(); print(today);//2023-01-31 18:03:32.363396 final fiftyDaysAgo = today.
发布于 2023-1-31 下午6:4 阅读数 825

DateTime.toLocal 方法

用法 DateTime toLocal() 在本地时区返回此 DateTime 值。 如果它已经在本地时区,则返回 this。否则,此方法等效于: DateTime.fromMicrosecondsSinceEpoch(microsecondsSinceEpoch, isUtc: false) 列子 DateTime toLoca
发布于 2023-1-31 下午5:59 阅读数 725

Dart DateTime.toUtc用法

用法 DateTime toUtc() 如果它已经是 UTC,则返回 this。否则,此方法等效于: DateTime.fromMicrosecondsSinceEpoch(microsecondsSinceEpoch,isUtc: true) DateTime toUtc() { if (isUtc) return this; return DateTime
发布于 2023-1-31 下午5:55 阅读数 728

dart:core 库中DateTime 类

dart:core 库中DateTime 类的用法介绍如下。 一个瞬间,例如 1969 年 7 月 20 日,晚上 8:18 GMT。 DateTimes 可以表示距离纪元(1970-01-01 UTC)最多 100,000,000 天的时间值:-271821-04-20 到 275760-09-13。 DateTime通
发布于 2023-1-31 下午5:52 阅读数 854

Dart 语言核心库dart:core之String 类(3)

String.fromCharCodes 用法: String.fromCharCodes( Iterable<int> charCodes, [int start = 0, int? end] ) 分配一个包含指定 charCodes 的新字符串。 charCodes 既可以是 UTF-16 代码单元,也可以是符文。如果
发布于 2023-1-22 下午10:5 阅读数 822

Dart 语言核心库dart:core之String 类(1)

String 字符串主要用于表示文本。一个字符可以由多个代码点表示,每个代码点由一个或两个代码单元组成。 字符串可以是单行或多行。单行字符串使用匹配的单引号或双引号编写,多行字符串使用三引号编写。以下都是有效的 Da
发布于 2023-1-22 下午5:46 阅读数 961

Dart 语言核心库dart:core之String 类(2)

String.replaceAll 字符串替换。 用法:String replaceAll(Pattern from, String replace); 将与 from 匹配的所有子字符串替换为 replace。 const string = 'halloworld!'; print(string.replaceAll('a', 'e'));//hello
发布于 2023-1-22 下午5:35 阅读数 916

Flutter - Provider的几类用法

什么是Provider Provider是 Flutter 中最流行、最成熟的状态管理方法之一。 Provider 的内部 DelegateWidget 是一个 StatefulWidget ,所以可以更新且具有生命周期。 Provider 是InheritedWidget的包装器。 Provider原理
发布于 2023-1-13 下午11:29 阅读数 1467

flutter 步骤条 Stepper

步骤条Stepper Stepper 构造函数 const Stepper({ super.key, required this.steps,// List<Step> this.physics,//滑动的物理效果 this.type = StepperType.vertical,//横向与纵向两种,默认为 StepperType.ver
发布于 2023-1-1 下午4:59 阅读数 1142
Dart

Dart

文章: 19关注: 2点击: 81
推荐作者
宽以待人处事,严于律己修身。
兴趣使然的学习者
不动如山,动如脱兔
无喜无悲
思考,总结一点东西。