让我先说一句,我是一个全新的flutter/dart,也不是一个经验丰富的程序员。 我正在尝试熟悉flutter的框架和工具,我正在尝试扩展flutter在项目生成中创建的基本计数器应用程序。我的目标是让应用程序跟踪计数器何时被“重置”,保持计数器的时间和计数,然后在另一个屏幕上以表格的形式显示这些数据。 这是我到目前为止所做的:我创建了一个类来跟踪数据: class CounterRecord {
int _counter; //Holds the value the counter was at on reset
DateTime _resetTime; //Holds the
我有一些反应元件,看起来是这样的:
import React, { useState } from 'react';
function Example() {
// Declare a new state variable, which we'll call "count"
const [count, setCount] = useState(0);
return (
<div>
<p>You clicked {count} times</p>
<button on