buildViewer method
Implementation
@override
Widget buildViewer() {
if (_excel == null || _currentSheet.isEmpty) {
return Center(child: Text(setText('Không có dữ liệu', 'No data')));
}
final sheet = _excel!.tables[_currentSheet];
if (sheet == null) {
return Center(
child: Text(setText('Sheet không tồn tại', 'Sheet not found')),
);
}
return Column(
children: [
// Sheet selector
if (_sheetNames.length > 1) _buildSheetSelector(),
// Excel table
Expanded(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
child: _buildTable(sheet),
),
),
),
],
);
}