svn项目 不显示绿色钩钩_钩在扑钩上

博客讨论了在使用 SVN 版本控制系统时遇到的问题,即项目文件不显示通常代表已提交状态的绿色钩钩图标。这可能影响开发者跟踪代码的最新状态。文章可能涉及了解决此类问题的步骤或探讨 SVN 的相关配置。
摘要由CSDN通过智能技术生成

svn项目 不显示绿色钩钩

Flutter Hooks help do away with Stateless and Stateful Widget boiler-plate.

Flutter Hooks有助于消除无状态和有状态的小组件样板。

Here’s an example that sets the hook version of the standard tab controller for tabs by calling the method useTabController(...);

这是设置标准的挂钩版本的示例 选项卡的选项卡控制器 ,方法是调用useTabController(...);

A wee bit of magic sauce,

一小撮魔术酱,

final _key = GlobalKey();

final _key = GlobalKey();

is used by the screen refresh repaint mechanism to identify the TabBarView widget. If you do not give the widget a key, any changes to ${_index.value} will update the Text widgets, but the display repaint will not replace the old Text widgets with their newer refreshed versions, which hold the newly updated _index.value unless a key is set key: _key in TabBarView

屏幕刷新重绘机制使用它来标识TabBarView小部件。 如果您不给窗口小部件一个键,则对${_index.value}任何更改都将更新文本窗口小部件,但是显示重绘不会将旧的文本窗口小部件替换为其较新的刷新版本,这些版本具有新更新的_index.value除非设置了key: _key否则key: _key 中的 TabBarView

import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
void main() => runApp(MaterialApp(home: TabBarDemo()));class TabBarDemo extends HookWidget {
final List<Widget> list = [
Tab(icon: Icon(Icons.card_travel)),
Tab(icon: Icon(Icons.add_shopping_cart)),
Tab(icon: Icon(Icons.ac_unit)),
];
@override
Widget build(BuildContext context) {
final _controller = useTabController(initialLength: list.length);
final _index = useState(0);
final _key = GlobalKey();
_controller.addListener(() {
_index.value = _controller.index;
});
return Scaffold(
appBar: AppBar(
bottom: TabBar(
onTap: (index) {},
controller: _controller,
tabs: list,),
title: Text('Tabs Demo ${_index.value}'),
),
body: TabBarView(
key: _key,
controller: _controller,
children: [
Center(
child: Text('1.\n_index: ${_index.value}\n_controller.index: ${_controller.index}', style: TextStyle(fontSize: 40),)),
Center(
child: Text('2.\n_index: ${_index.value}\n_controller.index: ${_controller.index}', style: TextStyle(fontSize: 40),)),
Center(
child: Text('3.\n_index: ${_index.value}\n_controller.index: ${_controller.index}', style: TextStyle(fontSize: 40),)),
],
),
);
}
}

You can see the complete project on GitHub:

您可以在GitHub看到完整的项目:

Remi Rousselet is the creator of flutter hooks,

Remi Rousselet是颤抖钩的创造者,

To use flutter_hooks add it as a dependency to your project pubspec.yaml file:

要使用flutter_hooks请将其作为依赖flutter_hooks添加到您的项目pubspec.yaml文件中:

dependencies:
flutter:
sdk: flutter flutter_hooks: any

Here is an article that shows you how to setup a flutter project in a sensible way; it’s also by Rémi Rousselet

这是一篇文章,向您展示如何以明智的方式设置Flutter项目。 这也是RémiRousselet

翻译自: https://medium.com/swlh/hooked-on-flutter-hooks-f56360901963

svn项目 不显示绿色钩钩

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值