### Install Flutter Library Source: https://github.com/bosskmk/pluto_grid/blob/master/packages/pluto_grid_export/example/windows/CMakeLists.txt Installs the main Flutter library file to the root of the installation bundle. This file is essential for the Flutter runtime. ```cmake install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) ``` -------------------------------- ### Install Application Bundle Source: https://github.com/bosskmk/pluto_grid/blob/master/packages/pluto_grid_export/example/linux/CMakeLists.txt Defines installation rules for creating a relocatable application bundle. This includes cleaning the bundle directory, installing the executable, ICU data, Flutter library, bundled plugins, and assets. ```cmake # === Installation === # By default, "installing" just makes a relocatable bundle in the build # directory. set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) endif() # Start with a clean build bundle directory every time. install(CODE " file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") " COMPONENT Runtime) set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" COMPONENT Runtime) install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) install(FILES "${bundled_library}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) endforeach(bundled_library) # Fully re-copy the assets directory on each build to avoid having stale files # from a previous install. set(FLUTTER_ASSET_DIR_NAME "flutter_assets") install(CODE " file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") " COMPONENT Runtime) install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) ``` -------------------------------- ### Install Executable and Runtime Components Source: https://github.com/bosskmk/pluto_grid/blob/master/example/windows/CMakeLists.txt Installs the main executable and required runtime files, including ICU data and Flutter library. ```cmake install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" COMPONENT Runtime) install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) ``` -------------------------------- ### Install Bundled Plugin Libraries Source: https://github.com/bosskmk/pluto_grid/blob/master/example/windows/CMakeLists.txt Installs any additional libraries bundled with plugins. ```cmake if(PLUGIN_BUNDLED_LIBRARIES) install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) endif() ``` -------------------------------- ### Configure Installation Rules Source: https://github.com/bosskmk/pluto_grid/blob/master/demo/windows/CMakeLists.txt Sets up installation rules for the project, including the executable, Flutter assets, libraries, and bundled plugins. It ensures files are placed correctly for runtime execution. ```cmake # === Installation === # Support files are copied into place next to the executable, so that it can # run in place. This is done instead of making a separate bundle (as on Linux) # so that building and running from within Visual Studio will work. set(BUILD_BUNDLE_DIR "$") # Make the "install" step default, as it's required to run. set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) endif() set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" COMPONENT Runtime) install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) if(PLUGIN_BUNDLED_LIBRARIES) install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) endif() # Fully re-copy the assets directory on each build to avoid having stale files # from a previous install. set(FLUTTER_ASSET_DIR_NAME "flutter_assets") install(CODE " file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") " COMPONENT Runtime) install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) # Install the AOT library on non-Debug builds only. install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" CONFIGURATIONS Profile;Release COMPONENT Runtime) ``` -------------------------------- ### Install Flutter Assets Directory Source: https://github.com/bosskmk/pluto_grid/blob/master/packages/pluto_grid_export/example/windows/CMakeLists.txt Installs the Flutter assets directory, ensuring that all application assets (images, fonts, etc.) are correctly copied to the installation bundle. It first removes any existing assets to prevent stale files. ```cmake set(FLUTTER_ASSET_DIR_NAME "flutter_assets") install(CODE " file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") " COMPONENT Runtime) install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) ``` -------------------------------- ### Install Executable Target Source: https://github.com/bosskmk/pluto_grid/blob/master/packages/pluto_grid_export/example/windows/CMakeLists.txt Installs the main executable target to the specified runtime destination. This makes the application executable available after the build process. ```cmake install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" COMPONENT Runtime) ``` -------------------------------- ### Configure Installation Directory for Visual Studio Source: https://github.com/bosskmk/pluto_grid/blob/master/example/windows/CMakeLists.txt Sets the installation prefix to be adjacent to the executable for Visual Studio builds, ensuring the application can run in place. ```cmake # Support files are copied into place next to the executable, so that it can # run in place. This is done instead of making a separate bundle (as on Linux) # so that building and running from within Visual Studio will work. set(BUILD_BUNDLE_DIR "$") # Make the "install" step default, as it's required to run. set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) endif() set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") ``` -------------------------------- ### Install Flutter Assets Source: https://github.com/bosskmk/pluto_grid/blob/master/example/windows/CMakeLists.txt Installs the Flutter assets directory, ensuring it is fully re-copied on each build to prevent stale files. ```cmake # Fully re-copy the assets directory on each build to avoid having stale files # from a previous install. set(FLUTTER_ASSET_DIR_NAME "flutter_assets") install(CODE " file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") " COMPONENT Runtime) install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) ``` -------------------------------- ### Initialize PlutoGrid with Configuration Source: https://github.com/bosskmk/pluto_grid/wiki/configuration/configuration-for-english Create a PlutoGrid instance and apply custom settings by passing a PlutoGridConfiguration object to the configuration property. This example enables column borders. ```dart var grid = PlutoGrid( columns: myData.columns, rows: myData.rows, configuration: PlutoGridConfiguration( enableColumnBorder: true, // ... ), ); ``` -------------------------------- ### Install AOT Library for Release Builds Source: https://github.com/bosskmk/pluto_grid/blob/master/example/windows/CMakeLists.txt Installs the Ahead-Of-Time (AOT) compiled library on Profile and Release configurations only. ```cmake # Install the AOT library on non-Debug builds only. install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" CONFIGURATIONS Profile;Release COMPONENT Runtime) ``` -------------------------------- ### Basic Grid Setup in Flutter Source: https://context7.com/bosskmk/pluto_grid/llms.txt Sets up a basic PlutoGrid with predefined columns and rows. Includes event handlers for grid loading and cell changes. Requires Flutter and PlutoGrid packages. ```dart import 'package:flutter/material.dart'; import 'package:pluto_grid/pluto_grid.dart'; class BasicGridExample extends StatelessWidget { final List columns = [ PlutoColumn( title: 'Name', field: 'name', type: PlutoColumnType.text(), ), PlutoColumn( title: 'Age', field: 'age', type: PlutoColumnType.number(), ), PlutoColumn( title: 'Role', field: 'role', type: PlutoColumnType.select(['Developer', 'Designer', 'Manager']), ), PlutoColumn( title: 'Join Date', field: 'join_date', type: PlutoColumnType.date(), ), ]; final List rows = [ PlutoRow(cells: { 'name': PlutoCell(value: 'John Doe'), 'age': PlutoCell(value: 30), 'role': PlutoCell(value: 'Developer'), 'join_date': PlutoCell(value: '2023-01-15'), }), PlutoRow(cells: { 'name': PlutoCell(value: 'Jane Smith'), 'age': PlutoCell(value: 28), 'role': PlutoCell(value: 'Designer'), 'join_date': PlutoCell(value: '2023-03-22'), }), ]; @override Widget build(BuildContext context) { return Scaffold( body: PlutoGrid( columns: columns, rows: rows, onLoaded: (PlutoGridOnLoadedEvent event) { // Access stateManager for grid control print('Grid loaded with ${event.stateManager.refRows.length} rows'); }, onChanged: (PlutoGridOnChangedEvent event) { print('Cell changed: ${event.column.field} = ${event.value}'); }, ), ); } } ``` -------------------------------- ### PlutoGrid Export Example Source: https://github.com/bosskmk/pluto_grid/blob/master/packages/pluto_grid_export/README.md This example demonstrates how to set up a PlutoGrid and implement export functionality for both PDF and CSV formats. It includes necessary imports and widget structure for a Flutter application. ```dart import 'dart:convert'; import 'package:file_saver/file_saver.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:pluto_grid/pluto_grid.dart'; import 'package:pluto_grid_export/pluto_grid_export.dart' as pluto_grid_export; void main() { runApp(const MyApp()); } /// For more details, please refer to the link below for how to use it. /// https://github.com/bosskmk/pluto_grid/blob/master/demo/lib/screen/feature/export_screen.dart class MyApp extends StatelessWidget { const MyApp({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blue, ), home: const MyHomePage(), ); } } class MyHomePage extends StatefulWidget { const MyHomePage({Key? key}) : super(key: key); @override State createState() => _MyHomePageState(); } class _MyHomePageState extends State { late PlutoGridStateManager stateManager; final List columns = [ PlutoColumn( title: 'Column1', field: 'column_1', type: PlutoColumnType.text(), ), PlutoColumn( title: 'Column2', field: 'column_2', type: PlutoColumnType.text(), ), PlutoColumn( title: 'Column3', field: 'column_3', type: PlutoColumnType.text(), ), ]; final List rows = [ PlutoRow( cells: { 'column_1': PlutoCell(value: 'cell 1-1'), 'column_2': PlutoCell(value: 'cell 1-2'), 'column_3': PlutoCell(value: 'cell 1-3'), }, ), PlutoRow( cells: { 'column_1': PlutoCell(value: 'cell 2-1'), 'column_2': PlutoCell(value: 'cell 2-2'), 'column_3': PlutoCell(value: 'cell 2-3'), }, ), PlutoRow( cells: { 'column_1': PlutoCell(value: 'cell 3-1'), 'column_2': PlutoCell(value: 'cell 3-2'), 'column_3': PlutoCell(value: 'cell 3-3'), }, ), ]; void exportToPdf() async { final themeData = pluto_grid_export.ThemeData.withFont( base: pluto_grid_export.Font.ttf( await rootBundle.load('fonts/open_sans/OpenSans-Regular.ttf'), ), bold: pluto_grid_export.Font.ttf( await rootBundle.load('fonts/open_sans/OpenSans-Bold.ttf'), ), ); var plutoGridPdfExport = pluto_grid_export.PlutoGridDefaultPdfExport( title: "Pluto Grid Sample pdf print", creator: "Pluto Grid Rocks!", format: pluto_grid_export.PdfPageFormat.a4.landscape, themeData: themeData, ); await pluto_grid_export.Printing.sharePdf( bytes: await plutoGridPdfExport.export(stateManager), filename: plutoGridPdfExport.getFilename(), ); } void exportToCsv() async { String title = "pluto_grid_export"; var exported = const Utf8Encoder() .convert(pluto_grid_export.PlutoGridExport.exportCSV(stateManager)); // use file_saver from pub.dev await FileSaver.instance.saveFile("$title.csv", exported, ".csv"); } @override Widget build(BuildContext context) { return Scaffold( body: Padding( padding: const EdgeInsets.all(20), child: Column( children: [ SizedBox( height: 50, child: Row( children: [ TextButton( onPressed: exportToPdf, child: const Text('Export to PDF'), ), TextButton( onPressed: exportToCsv, child: const Text('Export to CSV'), ), ], ), ), Expanded( child: PlutoGrid( columns: columns, rows: rows, onLoaded: (e) { stateManager = e.stateManager; }, ), ), ], ), ), ); } } ``` -------------------------------- ### Install AOT Library for Release/Profile Builds Source: https://github.com/bosskmk/pluto_grid/blob/master/packages/pluto_grid_export/example/windows/CMakeLists.txt Installs the Ahead-Of-Time (AOT) compiled library to the data directory, but only for 'Profile' and 'Release' configurations. This optimizes runtime performance for non-debug builds. ```cmake install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" CONFIGURATIONS Profile;Release COMPONENT Runtime) ``` -------------------------------- ### Set Installation Directory for Bundle Data Source: https://github.com/bosskmk/pluto_grid/blob/master/packages/pluto_grid_export/example/windows/CMakeLists.txt Configures the installation prefix to be adjacent to the executable, allowing the application to run from its build directory. This is particularly useful for Visual Studio builds. ```cmake set(BUILD_BUNDLE_DIR "$") set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) endif() set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") ``` -------------------------------- ### PlutoGrid Client-Side Pagination Example Source: https://context7.com/bosskmk/pluto_grid/llms.txt Implements client-side pagination for PlutoGrid, allowing automatic page management for large datasets. Configure page size and initial page within the `createFooter` and `onLoaded` callbacks. ```dart import 'package:flutter/material.dart'; import 'package:pluto_grid/pluto_grid.dart'; class PaginatedGridExample extends StatelessWidget { @override Widget build(BuildContext context) { return PlutoGrid( columns: columns, rows: rows, createFooter: (stateManager) { stateManager.setPageSize(100, notify: false); // Set rows per page return PlutoPagination( stateManager, pageSizeToMove: 1, // Pages to move with prev/next buttons ); }, onLoaded: (event) { event.stateManager.setPage(1); // Start on page 1 }, ); } } // Access pagination info in state manager void paginationInfo(PlutoGridStateManager stateManager) { final currentPage = stateManager.page; final totalPages = stateManager.totalPage; final pageSize = stateManager.pageSize; // Navigate to specific page stateManager.setPage(5); } ``` -------------------------------- ### Initialize CMake and Set Ephemeral Directory Source: https://github.com/bosskmk/pluto_grid/blob/master/example/windows/flutter/CMakeLists.txt Sets the minimum required CMake version and defines the ephemeral directory path. This is a standard CMake setup for project configuration. ```cmake cmake_minimum_required(VERSION 3.14) set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") ``` -------------------------------- ### Define Custom Keyboard Shortcuts for Grid Actions Source: https://context7.com/bosskmk/pluto_grid/llms.txt Implement custom actions for keyboard shortcuts by extending PlutoGridShortcutAction. Configure these actions in PlutoGridConfiguration. This example shows how to delete and duplicate rows. ```dart import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:pluto_grid/pluto_grid.dart'; // Custom action class class CustomDeleteRowAction extends PlutoGridShortcutAction { @override void execute({ required PlutoKeyManagerEvent keyEvent, required PlutoGridStateManager stateManager, }) { if (stateManager.currentRow != null) { stateManager.removeCurrentRow(); } } } class CustomDuplicateRowAction extends PlutoGridShortcutAction { @override void execute({ required PlutoKeyManagerEvent keyEvent, required PlutoGridStateManager stateManager, }) { if (stateManager.currentRow != null) { final currentRow = stateManager.currentRow!; final newCells = {}; currentRow.cells.forEach((key, cell) { newCells[key] = PlutoCell(value: cell.value); }); stateManager.insertRows( stateManager.currentRowIdx! + 1, [PlutoRow(cells: newCells)], ); } } } // Configure shortcuts final configuration = PlutoGridConfiguration( shortcut: PlutoGridShortcut( actions: { ...PlutoGridShortcut.defaultActions, // Delete row with Ctrl+Delete LogicalKeySet(LogicalKeyboardKey.control, LogicalKeyboardKey.delete): CustomDeleteRowAction(), // Duplicate row with Ctrl+D LogicalKeySet(LogicalKeyboardKey.control, LogicalKeyboardKey.keyD): CustomDuplicateRowAction(), }, ), ); PlutoGrid( columns: columns, rows: rows, configuration: configuration, ); ``` -------------------------------- ### Define Column Properties in PlutoGrid Source: https://github.com/bosskmk/pluto_grid/wiki/column/column-definition-for-korean Example demonstrating how to define various properties for a PlutoGrid column, including width, minimum width, and text alignment. ```dart var columns = [ PlutoColumn( title: 'Text column', field: 'text_column', type: PlutoColumnType.text(), // ... column properties width: 250, minWidth: 80, textAlign: PlutoColumnTextAlign.right, // ... ), // ... more columns ]; ``` -------------------------------- ### Find and check PkgConfig modules for GTK, GLIB, and GIO Source: https://github.com/bosskmk/pluto_grid/blob/master/packages/pluto_grid_export/example/linux/flutter/CMakeLists.txt This section uses PkgConfig to find and check for the required GTK, GLIB, and GIO libraries. These are essential system-level dependencies for the Flutter Linux GTK backend. Ensure these packages are installed on your system. ```cmake find_package(PkgConfig REQUIRED) pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) ``` -------------------------------- ### Install AOT Library on Non-Debug Builds Source: https://github.com/bosskmk/pluto_grid/blob/master/packages/pluto_grid_export/example/linux/CMakeLists.txt Installs the AOT library to the runtime directory only when the build type is not 'Debug'. Ensure the AOT_LIBRARY variable is correctly set. ```cmake if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) endif() ``` -------------------------------- ### Install ICU Data File Source: https://github.com/bosskmk/pluto_grid/blob/master/packages/pluto_grid_export/example/windows/CMakeLists.txt Installs the ICU data file to the data directory within the application bundle. This file is necessary for internationalization and localization features. ```cmake install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) ``` -------------------------------- ### PlutoGrid State Manager API Example Source: https://context7.com/bosskmk/pluto_grid/llms.txt Demonstrates various State Manager API methods for controlling PlutoGrid, such as setting selection mode, accessing rows, manipulating cells, and performing column operations. Requires initialization of `stateManager` within `onLoaded`. ```dart import 'package:pluto_grid/pluto_grid.dart'; late PlutoGridStateManager stateManager; PlutoGrid( columns: columns, rows: rows, onLoaded: (PlutoGridOnLoadedEvent event) { stateManager = event.stateManager; // Set selection mode stateManager.setSelectingMode(PlutoGridSelectingMode.row); // Access all rows (including filtered) final allRows = stateManager.refRows.originalList; // Access visible/filtered rows final visibleRows = stateManager.refRows; // Get current cell and row final currentCell = stateManager.currentCell; final currentRow = stateManager.currentRow; final currentRowIdx = stateManager.currentRowIdx; // Set current cell programmatically stateManager.setCurrentCell( stateManager.refRows[0].cells['name'], 0, ); }, ); // Add rows void addRows() { final newRows = [ PlutoRow(cells: { 'name': PlutoCell(value: 'New User'), 'age': PlutoCell(value: 25), }), ]; stateManager.appendRows(newRows); // Add at end stateManager.prependRows(newRows); // Add at beginning stateManager.insertRows(2, newRows); // Insert at index } // Remove rows void removeRows() { stateManager.removeRows([stateManager.refRows[0]]); stateManager.removeCurrentRow(); stateManager.removeAllRows(); } // Update cell value void updateCell() { stateManager.changeCellValue( stateManager.currentCell!, 'New Value', callOnChangedEvent: true, force: false, // Set true to update read-only cells ); } // Column operations void columnOperations() { // Hide/show columns stateManager.hideColumn(stateManager.refColumns[0], true); // Move column stateManager.moveColumn( column: stateManager.refColumns[0], targetColumn: stateManager.refColumns[2], ); // Sort column stateManager.sortAscending(stateManager.refColumns[0]); stateManager.sortDescending(stateManager.refColumns[0]); stateManager.toggleSortColumn(stateManager.refColumns[0]); } // Row selection and checking void selectionOperations() { // Get checked rows final checkedRows = stateManager.checkedRows; // Toggle row check stateManager.setRowChecked(stateManager.refRows[0], true); stateManager.toggleAllRowChecked(true); // Get selected rows (when in multi-select mode) final selectedRows = stateManager.currentSelectingRows; } // Loading state void showLoading() { stateManager.setShowLoading(true, level: PlutoGridLoadingLevel.grid); // PlutoGridLoadingLevel.rows - shows progress bar // PlutoGridLoadingLevel.rowsBottomCircular - shows circular indicator } // Async row initialization for large datasets void initializeAsync() async { stateManager.setShowLoading(true); final rows = await PlutoGridStateManager.initializeRowsAsync( columns, fetchedRows, chunkSize: 100, duration: Duration(milliseconds: 1), ); stateManager.refRows.addAll(rows); stateManager.setShowLoading(false); stateManager.notifyListeners(); } ``` -------------------------------- ### Customize PlutoGrid Appearance and Behavior Source: https://context7.com/bosskmk/pluto_grid/llms.txt This snippet demonstrates how to configure PlutoGrid's appearance, including dark mode, keyboard actions, and styling options. It shows examples of creating custom light and dark themes, as well as localization settings. ```dart import 'package:flutter/material.dart'; import 'package:pluto_grid/pluto_grid.dart'; // Light theme configuration final lightConfig = PlutoGridConfiguration( enableMoveDownAfterSelecting: false, enableMoveHorizontalInEditing: true, enterKeyAction: PlutoGridEnterKeyAction.editingAndMoveDown, tabKeyAction: PlutoGridTabKeyAction.moveToNextOnEdge, style: PlutoGridStyleConfig( enableGridBorderShadow: false, enableColumnBorderVertical: true, enableCellBorderVertical: true, gridBackgroundColor: Colors.white, rowColor: Colors.white, oddRowColor: Colors.grey[50], evenRowColor: Colors.white, activatedColor: Color(0xFFDCF5FF), checkedColor: Color(0x11757575), cellColorInEditState: Colors.white, cellColorInReadOnlyState: Color(0xFFDBDBDC), gridBorderColor: Color(0xFFA1A5AE), borderColor: Color(0xFFDDE2EB), activatedBorderColor: Colors.lightBlue, iconColor: Colors.black26, iconSize: 18, rowHeight: 45, columnHeight: 45, columnFilterHeight: 45, defaultCellPadding: EdgeInsets.symmetric(horizontal: 10), columnTextStyle: TextStyle( color: Colors.black, fontWeight: FontWeight.w600, fontSize: 14, ), cellTextStyle: TextStyle( color: Colors.black, fontSize: 14, ), gridBorderRadius: BorderRadius.circular(8), ), scrollbar: PlutoGridScrollbarConfig( draggableScrollbar: true, isAlwaysShown: false, scrollbarThickness: 8, ), columnFilter: PlutoGridColumnFilterConfig( debounceMilliseconds: 300, ), columnSize: PlutoGridColumnSizeConfig( autoSizeMode: PlutoAutoSizeMode.scale, resizeMode: PlutoResizeMode.normal, ), localeText: PlutoGridLocaleText(), // Default English ); // Dark theme - use built-in dark configuration final darkConfig = PlutoGridConfiguration.dark( style: PlutoGridStyleConfig.dark( gridBorderRadius: BorderRadius.circular(8), ), ); // Localization examples final koreanLocale = PlutoGridLocaleText.korean(); final japaneseLocale = PlutoGridLocaleText.japanese(); final spanishLocale = PlutoGridLocaleText.spanish(); final germanLocale = PlutoGridLocaleText.german(); final frenchLocale = PlutoGridLocaleText.french(); final chineseLocale = PlutoGridLocaleText.china(); // Using configuration PlutoGrid( columns: columns, rows: rows, configuration: darkConfig, ); ``` -------------------------------- ### Configure Build Options Source: https://github.com/bosskmk/pluto_grid/blob/master/demo/windows/CMakeLists.txt Sets up the available build configurations (Debug, Profile, Release) for the project. This is crucial for managing different build types. ```cmake get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) if(IS_MULTICONFIG) set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" CACHE STRING "" FORCE) else() if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Flutter build mode" FORCE) set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Profile" "Release") endif() endif() ``` -------------------------------- ### Set Minimum CMake Version Source: https://github.com/bosskmk/pluto_grid/blob/master/demo/windows/flutter/CMakeLists.txt Specifies the minimum required version of CMake for this project. Ensure your CMake installation meets this requirement. ```cmake cmake_minimum_required(VERSION 3.15) ``` -------------------------------- ### Define Executable and Link Libraries Source: https://github.com/bosskmk/pluto_grid/blob/master/demo/windows/runner/CMakeLists.txt Configures the main executable for the project, specifying source files, applying standard settings, defining NOMINMAX, linking necessary libraries (flutter, flutter_wrapper_app), setting include directories, and adding dependencies. ```cmake cmake_minimum_required(VERSION 3.15) project(runner LANGUAGES CXX) add_executable(${BINARY_NAME} WIN32 "flutter_window.cpp" "main.cpp" "run_loop.cpp" "utils.cpp" "win32_window.cpp" "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" "Runner.rc" "runner.exe.manifest" ) apply_standard_settings(${BINARY_NAME}) target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") add_dependencies(${BINARY_NAME} flutter_assemble) ``` -------------------------------- ### Define Select Column in PlutoGrid Source: https://github.com/bosskmk/pluto_grid/wiki/column/column-definition-for-korean Example of defining a select column where users can choose from a predefined list of options. The options can be strings or enums. ```dart var columns = [ PlutoColumn( title: 'Select column', field: 'select_column', type: PlutoColumnType.select([ 'Apple', 'Banana', 'Orange', ]), // ... column properties ), // ... more columns ]; ``` -------------------------------- ### Basic PlutoGrid Implementation in Flutter Source: https://github.com/bosskmk/pluto_grid/wiki/quick_start/quick-start-for-english This snippet shows how to set up a basic Flutter application with PlutoGrid. It includes defining columns with different types (text, number, select, date) and populating rows with sample data. Ensure you have the pluto_grid package imported. ```dart import 'package:flutter/material.dart'; import 'package:pluto_grid/pluto_grid.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'PlutoGrid Demo', theme: ThemeData( primarySwatch: Colors.blue, ), home: MyHomePage(), ); } } class MyHomePage extends StatefulWidget { @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State { final myData = MyGridData(); @override Widget build(BuildContext context) { return Scaffold( resizeToAvoidBottomInset: false, appBar: AppBar( title: const Text('PlutoGrid Demo'), ), body: Container( padding: const EdgeInsets.all(30), child: PlutoGrid( columns: myData.columns, rows: myData.rows, ), ), ); } } class MyGridData { List columns; List rows; MyGridData() { columns = [ PlutoColumn( title: 'Text', field: 'text_field', type: PlutoColumnType.text(), ), PlutoColumn( title: 'Number', field: 'number_field', type: PlutoColumnType.number(), ), PlutoColumn( title: 'Select', field: 'select_field', type: PlutoColumnType.select(['item1', 'item2', 'item3']), ), PlutoColumn( title: 'Date', field: 'date_field', type: PlutoColumnType.date(), ), ]; rows = [ PlutoRow( cells: { 'text_field': PlutoCell(value: 'Text cell value1'), 'number_field': PlutoCell(value: 2020), 'select_field': PlutoCell(value: 'item1'), 'date_field': PlutoCell(value: '2020-08-06'), }, ), PlutoRow( cells: { 'text_field': PlutoCell(value: 'Text cell value2'), 'number_field': PlutoCell(value: 2021), 'select_field': PlutoCell(value: 'item2'), 'date_field': PlutoCell(value: '2020-08-07'), }, ), PlutoRow( cells: { 'text_field': PlutoCell(value: 'Text cell value3'), 'number_field': PlutoCell(value: 2022), 'select_field': PlutoCell(value: 'item3'), 'date_field': PlutoCell(value: '2020-08-08'), }, ), ]; } } ``` -------------------------------- ### Export Flutter Library and ICU Data Source: https://github.com/bosskmk/pluto_grid/blob/master/packages/pluto_grid_export/example/windows/flutter/CMakeLists.txt Makes the Flutter library path and ICU data file available in the parent CMake scope for use in installation steps. ```cmake set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) ``` ```cmake set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) ``` ```cmake set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) ``` ```cmake set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) ``` -------------------------------- ### Publish Flutter Library and ICU Data Source: https://github.com/bosskmk/pluto_grid/blob/master/demo/windows/flutter/CMakeLists.txt Exports Flutter library and ICU data file paths to the parent scope. This makes them available for installation or other build steps. ```cmake set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) ``` -------------------------------- ### Define C++ Wrapper Plugin Sources Source: https://github.com/bosskmk/pluto_grid/blob/master/packages/pluto_grid_export/example/windows/flutter/CMakeLists.txt Lists the C++ source files specific to plugin registration within the client wrapper. These are prepended with the wrapper root directory path. ```cmake list(APPEND CPP_WRAPPER_SOURCES_PLUGIN "plugin_registrar.cc" ) list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") ``` -------------------------------- ### Set Default Locale for Date and Number Formatting Source: https://context7.com/bosskmk/pluto_grid/llms.txt Configure date and number formatting for different locales using PlutoGrid.setDefaultLocale() and PlutoGrid.initializeDateFormat(). This example sets the locale to German ('de_DE'). ```dart import 'package:flutter/material.dart'; import 'package:pluto_grid/pluto_grid.dart'; void main() { // Set default locale for date/number formatting PlutoGrid.setDefaultLocale('de_DE'); // German PlutoGrid.initializeDateFormat(); runApp(MyApp()); } // Use locale-specific configuration final germanConfig = PlutoGridConfiguration( localeText: PlutoGridLocaleText.german(), ); // Custom locale text final customLocale = PlutoGridLocaleText( unfreezeColumn: 'Unfreeze', freezeColumnToStart: 'Freeze Left', freezeColumnToEnd: 'Freeze Right', autoFitColumn: 'Auto Fit', hideColumn: 'Hide', setColumns: 'Columns...', setFilter: 'Filter...', resetFilter: 'Clear Filter', filterContains: 'Contains', filterEquals: 'Equals', filterStartsWith: 'Starts with', filterEndsWith: 'Ends with', filterGreaterThan: 'Greater than', filterLessThan: 'Less than', loadingText: 'Loading...', ); ``` -------------------------------- ### Define Text Column with Default Value Source: https://github.com/bosskmk/pluto_grid/wiki/column/column-definition-for-english Example of defining a text column with a default empty string value. Note that the `readOnly` property within `PlutoColumnType.text()` was removed in version 2.7.0. ```dart var columns = [ PlutoColumn( title: 'Text column', field: 'text_column', type: PlutoColumnType.text( // readOnly: false, // This property was removed in version 2.7.0. defaultValue: '', // ... column type properties ), readOnly: false, // Added in version 2.7.0. // ... column properties ), // ... more columns ]; ``` -------------------------------- ### Enable Unicode Support Source: https://github.com/bosskmk/pluto_grid/blob/master/example/windows/CMakeLists.txt Adds preprocessor definitions to enable Unicode support for all projects. ```cmake add_definitions(-DUNICODE -D_UNICODE) ``` -------------------------------- ### Set Project and Binary Name Source: https://github.com/bosskmk/pluto_grid/blob/master/demo/windows/CMakeLists.txt Initializes the CMake project and sets the name of the executable binary. Ensures compatibility with CMake version 3.15 or newer. ```cmake cmake_minimum_required(VERSION 3.15) project(example LANGUAGES CXX) set(BINARY_NAME "example") ``` -------------------------------- ### Apply Standard Build Settings Source: https://github.com/bosskmk/pluto_grid/blob/master/packages/pluto_grid_export/example/windows/runner/CMakeLists.txt Applies a standard set of build settings to the target. This can be customized for applications requiring different build configurations. ```cmake # Apply the standard set of build settings. This can be removed for applications # that need different build settings. apply_standard_settings(${BINARY_NAME}) ``` -------------------------------- ### Define Custom Column Filter Source: https://github.com/bosskmk/pluto_grid/wiki/configuration/configuration-for-english Implement the PlutoFilterType interface to create a custom filter. This example defines a 'Custom contains' filter that checks if a comma-separated list of values contains the base value (case-insensitive). ```dart class ClassYouImplemented implements PlutoFilterType { String get title => 'Custom contains'; get compare => ({ String base, String search, PlutoColumn column, }) { var keys = search.split(',').map((e) => e.toUpperCase()).toList(); return keys.contains(base.toUpperCase()); }; const ClassYouImplemented(); } ``` -------------------------------- ### Link Libraries and Include Directories Source: https://github.com/bosskmk/pluto_grid/blob/master/packages/pluto_grid_export/example/windows/runner/CMakeLists.txt Adds necessary dependency libraries and include directories. Application-specific dependencies should also be added here. ```cmake # Add dependency libraries and include directories. Add any application-specific # dependencies here. target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") ``` -------------------------------- ### Define Text Column in PlutoGrid Source: https://github.com/bosskmk/pluto_grid/wiki/column/column-definition-for-korean Example of defining a basic text column with properties like title, field, type, and readOnly status. Note that `readOnly` was removed from column type properties in versions 2.7.0 and above. ```dart var columns = [ PlutoColumn( title: 'Text column', field: 'text_column', type: PlutoColumnType.text( // readOnly: false, // 2.7.0 이상 버전에서 삭제 되었습니다. defaultValue: '', // ... column type properties ), readOnly: false, // 2.7.0 이상 버전에서 추가 되었습니다. // ... column properties ), // ... more columns ]; ``` -------------------------------- ### Prepend Wrapper Root to App Sources Source: https://github.com/bosskmk/pluto_grid/blob/master/demo/windows/flutter/CMakeLists.txt Adds the C++ wrapper root directory path to the beginning of each application wrapper source file path. ```cmake list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") ``` -------------------------------- ### Define Application Executable Source: https://github.com/bosskmk/pluto_grid/blob/master/packages/pluto_grid_export/example/linux/CMakeLists.txt Specifies the main executable target, including its source files and generated plugin registration. New source files should be added to this list. ```cmake # Define the application target. To change its name, change BINARY_NAME above, # not the value here, or `flutter run` will no longer work. # # Any new source files that you add to the application should be added here. add_executable(${BINARY_NAME} "main.cc" "my_application.cc" "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" ) ``` -------------------------------- ### Initialize Flutter Web App Source: https://github.com/bosskmk/pluto_grid/blob/master/packages/pluto_grid_export/example/web/index.html This script initializes the Flutter web engine and runs the application. It's typically injected by the Flutter build process. ```javascript var serviceWorkerVersion = null; window.addEventListener('load', function(ev) { // Download main.dart.js _flutter.loader.loadEntrypoint({ serviceWorker: { serviceWorkerVersion: serviceWorkerVersion, } }).then(function(engineInitializer) { return engineInitializer.initializeEngine(); }).then(function(appRunner) { return appRunner.runApp(); }); }); ``` -------------------------------- ### Set Runtime Output Directory Source: https://github.com/bosskmk/pluto_grid/blob/master/packages/pluto_grid_export/example/linux/CMakeLists.txt Configures the runtime output directory for the executable to a subdirectory. This is to ensure correct launching behavior with bundled resources. ```cmake # Only the install-generated bundle's copy of the executable will launch # correctly, since the resources must in the right relative locations. To avoid # people trying to run the unbundled copy, put it in a subdirectory instead of # the default top-level location. set_target_properties(${BINARY_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" ) ``` -------------------------------- ### Define C++ Wrapper Sources Source: https://github.com/bosskmk/pluto_grid/blob/master/example/windows/flutter/CMakeLists.txt Lists the source files for the C++ client wrapper, categorized into core, plugin, and application components. These are used to build static libraries. ```cmake # === Wrapper === list(APPEND CPP_WRAPPER_SOURCES_CORE "core_implementations.cc" "standard_codec.cc" ) list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") list(APPEND CPP_WRAPPER_SOURCES_PLUGIN "plugin_registrar.cc" ) list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") list(APPEND CPP_WRAPPER_SOURCES_APP "flutter_engine.cc" "flutter_view_controller.cc" ) list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") ``` -------------------------------- ### Enable Client-Side Pagination in PlutoGrid Source: https://github.com/bosskmk/pluto_grid/wiki/pagination/row-pagination-for-english Use the PlutoPagination widget in the createFooter callback to enable client-side pagination. The page size can be set, with a default of 40 if not specified. ```dart var grid = PlutoGrid( columns: myData.columns, rows: myData.rows, createFooter: (stateManager) { stateManager.setPageSize(100, notify: false); // Can be omitted. (Default 40) return PlutoPagination(stateManager); }, ); ``` -------------------------------- ### Configure Flutter Tool Backend Command Source: https://github.com/bosskmk/pluto_grid/blob/master/example/windows/flutter/CMakeLists.txt Sets up a custom command to execute the Flutter tool backend script. This command is designed to run every time by using a phony output file, ensuring Flutter assets are always assembled. ```cmake # === Flutter tool backend === # _phony_ is a non-existent file to force this command to run every time, # since currently there's no way to get a full input/output list from the # flutter tool. set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) add_custom_command( OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} ${CPP_WRAPPER_SOURCES_APP} ${PHONY_OUTPUT} COMMAND ${CMAKE_COMMAND} -E env ${FLUTTER_TOOL_ENVIRONMENT} "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" windows-x64 $ VERBATIM ) ``` -------------------------------- ### Prepend Wrapper Root to Plugin Sources Source: https://github.com/bosskmk/pluto_grid/blob/master/demo/windows/flutter/CMakeLists.txt Adds the C++ wrapper root directory path to the beginning of each plugin wrapper source file path. ```cmake list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") ``` -------------------------------- ### Define C++ Wrapper Core Sources Source: https://github.com/bosskmk/pluto_grid/blob/master/packages/pluto_grid_export/example/windows/flutter/CMakeLists.txt Lists the core C++ source files for the client wrapper. These are prepended with the wrapper root directory path. ```cmake list(APPEND CPP_WRAPPER_SOURCES_CORE "core_implementations.cc" "standard_codec.cc" ) list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") ``` -------------------------------- ### Set Project Name and ID Source: https://github.com/bosskmk/pluto_grid/blob/master/packages/pluto_grid_export/example/linux/CMakeLists.txt Configures the executable name and GTK application identifier for the project. Ensure APPLICATION_ID follows the recommended format. ```cmake cmake_minimum_required(VERSION 3.10) project(runner LANGUAGES CXX) # The name of the executable created for the application. Change this to change # the on-disk name of your application. set(BINARY_NAME "example") # The unique GTK application identifier for this application. See: # https://wiki.gnome.org/HowDoI/ChooseApplicationID set(APPLICATION_ID "com.example.example") ``` -------------------------------- ### Integrate Flutter Build Rules Source: https://github.com/bosskmk/pluto_grid/blob/master/demo/windows/CMakeLists.txt Includes the Flutter library and tool build rules, and then includes generated plugin build rules. This is essential for integrating Flutter into the native build. ```cmake set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") # Flutter library and tool build rules. add_subdirectory(${FLUTTER_MANAGED_DIR}) # Application build add_subdirectory("runner") # Generated plugin build rules, which manage building the plugins and adding # them to the application. include(flutter/generated_plugins.cmake) ``` -------------------------------- ### Create Static Plugin Wrapper Library Source: https://github.com/bosskmk/pluto_grid/blob/master/demo/windows/flutter/CMakeLists.txt Creates a static library target for the Flutter C++ wrapper used by plugins. It includes core and plugin-specific sources and applies standard build settings. ```cmake add_library(flutter_wrapper_plugin STATIC ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} ) apply_standard_settings(flutter_wrapper_plugin) set_target_properties(flutter_wrapper_plugin PROPERTIES POSITION_INDEPENDENT_CODE ON) set_target_properties(flutter_wrapper_plugin PROPERTIES CXX_VISIBILITY_PRESET hidden) target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) target_include_directories(flutter_wrapper_plugin PUBLIC "${WRAPPER_ROOT}/include" ) add_dependencies(flutter_wrapper_plugin flutter_assemble) ``` -------------------------------- ### PlutoGrid Column Types Configuration Source: https://context7.com/bosskmk/pluto_grid/llms.txt Demonstrates various PlutoGrid column types including text, number, currency, select, date, and time. Shows configuration options for formatting, validation, and default values. Ensure PlutoGrid package is imported. ```dart PlutoColumn( title: 'Description', field: 'description', type: PlutoColumnType.text(defaultValue: ''), ); ``` ```dart PlutoColumn( title: 'Price', field: 'price', type: PlutoColumnType.number( negative: true, // Allow negative numbers format: '#,###.##', // Number format pattern applyFormatOnInit: true, // Apply format when loading locale: 'en_US', // Locale for formatting ), ); ``` ```dart PlutoColumn( title: 'Amount', field: 'amount', type: PlutoColumnType.currency( name: 'USD', symbol: ' e', // Corrected escape sequence for backslash decimalDigits: 2, locale: 'en_US', ), ); ``` ```dart PlutoColumn( title: 'Status', field: 'status', type: PlutoColumnType.select( ['Pending', 'Active', 'Completed', 'Cancelled'], enableColumnFilter: true, // Enable filtering in popup popupIcon: Icons.arrow_drop_down, ), ); ``` ```dart PlutoColumn( title: 'Due Date', field: 'due_date', type: PlutoColumnType.date( startDate: DateTime.now(), endDate: DateTime.now().add(Duration(days: 365)), format: 'yyyy-MM-dd', headerFormat: 'yyyy-MM', ), ); ``` ```dart PlutoColumn( title: 'Start Time', field: 'start_time', type: PlutoColumnType.time(defaultValue: '09:00'), ); ``` -------------------------------- ### List Core Wrapper Sources Source: https://github.com/bosskmk/pluto_grid/blob/master/demo/windows/flutter/CMakeLists.txt Appends core C++ wrapper source files to a list. These files contain fundamental implementations for the client wrapper. ```cmake list(APPEND CPP_WRAPPER_SOURCES_CORE "core_implementations.cc" "standard_codec.cc" ) ```