Browsable gallery with optional autoplay; it is not a media player.
TxGallery
| Parameter | Type | Default | Meaning |
|---|---|---|---|
| items | List<T> | const [] | Entries; replaced by dataSource when bound. |
| dataSource | Object? | null | List, configuration or DataSource instance; takes precedence over items. |
| itemBuilder | Widget Function(BuildContext, T) | required | Builds custom content; callback arguments and return type are given in the signature. |
| selectedIndex | int | 0 | Zero-based active entry. |
| onChanged | ValueChanged<int>? | null | Callback for changed; see the signature for arguments and return type. |
| loop | bool | false | Allows wrapping from the last gallery entry to the first. |
| slideshowDelay | Duration | Duration.zero | Automatic navigation interval; 0 disables it. |
| height | double | 240 | Height; Vue numbers use pixels, Flutter uses logical pixels. |
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)));
}