Skip to content

Commit

Permalink
flutter version updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ravilsimform committed Nov 27, 2024
1 parent 3b0fd4f commit 683f059
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 28 deletions.
4 changes: 2 additions & 2 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.9.24'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
52 changes: 29 additions & 23 deletions lib/chip_display/multi_select_chip_display.dart
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,23 @@ class MultiSelectChipDisplay<V> extends StatelessWidget {
this.disabled = false;
}

MultiSelectChipDisplay.none({
this.items = const [],
this.disabled = true,
this.onTap,
this.chipColor,
this.alignment,
this.decoration,
this.textStyle,
this.colorator,
this.icon,
this.shape,
this.scroll = false,
this.scrollBar,
this.height,
this.chipWidth,
this.iconList,
this.trailing
});
MultiSelectChipDisplay.none(
{this.items = const [],
this.disabled = true,
this.onTap,
this.chipColor,
this.alignment,
this.decoration,
this.textStyle,
this.colorator,
this.icon,
this.shape,
this.scroll = false,
this.scrollBar,
this.height,
this.chipWidth,
this.iconList,
this.trailing});

@override
Widget build(BuildContext context) {
Expand All @@ -104,14 +103,18 @@ class MultiSelectChipDisplay<V> extends StatelessWidget {
height: height ?? MediaQuery.of(context).size.height * 0.08,
child: scrollBar != null
? Scrollbar(
isAlwaysShown: scrollBar!.isAlwaysShown,
thumbVisibility: scrollBar!.isAlwaysShown,
controller: _scrollController,
child: ListView.builder(
controller: _scrollController,
scrollDirection: Axis.horizontal,
itemCount: items!.length,
itemBuilder: (ctx, index) {
return _buildItem(items![index]!, iconList?[index], context);
return _buildItem(
items![index]!,
iconList?[index],
context,
);
},
),
)
Expand All @@ -120,7 +123,8 @@ class MultiSelectChipDisplay<V> extends StatelessWidget {
scrollDirection: Axis.horizontal,
itemCount: items!.length,
itemBuilder: (ctx, index) {
return _buildItem(items![index]!,iconList?[index], context);
return _buildItem(
items![index]!, iconList?[index], context);
},
),
)
Expand Down Expand Up @@ -165,8 +169,10 @@ class MultiSelectChipDisplay<V> extends StatelessWidget {
fontSize: textStyle != null ? textStyle!.fontSize : null,
),
),
if(trailing != null) ...{
const SizedBox(width: 8,),
if (trailing != null) ...{
const SizedBox(
width: 8,
),
trailing!
}
],
Expand Down
2 changes: 1 addition & 1 deletion lib/chip_field/multi_select_chip_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ class __MultiSelectChipFieldViewState<V>
MediaQuery.of(context).size.height * 0.08,
child: widget.scrollBar != null
? Scrollbar(
isAlwaysShown: widget.scrollBar!.isAlwaysShown,
thumbVisibility: widget.scrollBar!.isAlwaysShown,
controller: _scrollController,
child: ListView.builder(
controller: _scrollController,
Expand Down
2 changes: 1 addition & 1 deletion lib/util/multi_select_actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'multi_select_item.dart';

/// Contains common actions that are used by different multi select classes.
class MultiSelectActions<T> {
mixin MultiSelectActions<T> {
List<T> onItemCheckedChange(
List<T> selectedValues, T itemValue, bool checked) {
if (checked) {
Expand Down
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ documentation: https://github.com/CHB61/flutter-multi-select
homepage: https://github.com/CHB61/flutter-multi-select

environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=3.0.0 <4.0.0'
flutter: ">=3.0.0 <4.0.0"

dependencies:
flutter:
Expand Down

0 comments on commit 683f059

Please sign in to comment.