t×tecexpressby TeKOcloud
DEv0.7.1
Data & views / FLUTTER

TxGallery.

Interactive preview

Browsable gallery with optional autoplay; it is not a media player.

TxGallery

ParameterTypeDefaultMeaning
itemsList<T>const []Entries; replaced by dataSource when bound.
dataSourceObject?nullList, configuration or DataSource instance; takes precedence over items.
itemBuilderWidget Function(BuildContext, T)requiredBuilds custom content; callback arguments and return type are given in the signature.
selectedIndexint0Zero-based active entry.
onChangedValueChanged<int>?nullCallback for changed; see the signature for arguments and return type.
loopboolfalseAllows wrapping from the last gallery entry to the first.
slideshowDelayDurationDuration.zeroAutomatic navigation interval; 0 disables it.
heightdouble240Height; Vue numbers use pixels, Flutter uses logical pixels.
dart
import 'package:flutter/material.dart';
import 'package:tecexpress/tecexpress.dart';

Widget example() {

  return TxGallery<String>(items: const ['One', 'Two'], itemBuilder: (context, item) => Center(child: Text(item)));
}