Update Selector 2
This commit is contained in:
@@ -366,32 +366,31 @@ class _ProxiesTabViewState extends State<ProxiesTabView>
|
||||
}) {
|
||||
return SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: AnimateGrid<Proxy>(
|
||||
items: _getProxies(group.all, proxiesSortType),
|
||||
columns: columns,
|
||||
itemHeight: _getItemHeight(),
|
||||
keyBuilder: (item) {
|
||||
return ObjectKey(item);
|
||||
},
|
||||
builder: (_, proxy) {
|
||||
return Selector3<AppState, Config, ClashConfig,
|
||||
ProxiesCardSelectorState>(
|
||||
selector: (_, appState, config, clashConfig) =>
|
||||
ProxiesCardSelectorState(
|
||||
currentGroupName: appState.getCurrentGroupName(
|
||||
config.currentGroupName,
|
||||
clashConfig.mode,
|
||||
),
|
||||
currentProxyName: appState.getCurrentProxyName(
|
||||
config.currentProxyName,
|
||||
clashConfig.mode,
|
||||
),
|
||||
),
|
||||
builder: (_, state, __) {
|
||||
child: Selector3<AppState, Config, ClashConfig, ProxiesCardSelectorState>(
|
||||
selector: (_, appState, config, clashConfig) =>
|
||||
ProxiesCardSelectorState(
|
||||
currentGroupName: appState.getCurrentGroupName(
|
||||
config.currentGroupName,
|
||||
clashConfig.mode,
|
||||
),
|
||||
currentProxyName: appState.getCurrentProxyName(
|
||||
config.currentProxyName,
|
||||
clashConfig.mode,
|
||||
),
|
||||
),
|
||||
builder: (_, state, __) {
|
||||
return AnimateGrid<Proxy>(
|
||||
items: _getProxies(group.all, proxiesSortType),
|
||||
columns: columns,
|
||||
itemHeight: _getItemHeight(),
|
||||
keyBuilder: (item) {
|
||||
return ObjectKey(item);
|
||||
},
|
||||
builder: (_, proxy) {
|
||||
final isSelected = group.type == GroupType.Selector
|
||||
? group.name == state.currentGroupName &&
|
||||
proxy.name == state.currentProxyName
|
||||
: group.now == state.currentProxyName;
|
||||
proxy.name == state.currentProxyName
|
||||
: group.now == proxy.name;
|
||||
return _card(
|
||||
isSelected: isSelected,
|
||||
onPressed: () {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: fl_clash
|
||||
description: A multi-platform proxy client based on ClashMeta, simple and easy to use, open-source and ad-free.
|
||||
publish_to: 'none'
|
||||
version: 0.7.6
|
||||
version: 0.7.7
|
||||
environment:
|
||||
sdk: '>=3.1.0 <4.0.0'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user