Flutter-based application development method and device
The Flutter-based application development method addresses cross-platform development challenges by integrating real-time collaboration and data security features, improving efficiency and security in collaborative applications.
Patent Information
- Application Number
- CN202411094110.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2025-01-03
AI Technical Summary
Existing collaboration tools face challenges in cross-platform development, complex integration and implementation of real-time collaboration functions, long development cycles, and inadequate user experience and data security in real-time collaboration applications.
A Flutter-based application development method that includes configuring the Flutter development environment, setting project structure and configuration files, creating a Flutter project with business modules, building UI interfaces using responsive design, and packaging for various platforms, while incorporating modules for real-time collaboration, data synchronization, conflict handling, and data security.
Simplifies the development process, enhances efficiency and performance, and ensures user privacy and data security in multi-person real-time collaborative applications.
Smart Images

Figure CN119248226A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of application development, and in particular to a method and device for application development based on Flutter. Background Art
[0002] With the popularity of remote work and online collaboration, more and more companies and individuals need efficient real-time collaboration tools. However, existing collaboration tools have many problems in the development and maintenance process, such as the inability to meet cross-platform development requirements, the complexity of the integration and implementation of real-time collaboration functions, the long development cycle, and the poor collaboration experience of users on different devices or platforms. In addition, data security and privacy protection are also crucial in real-time collaboration applications. Based on the above problems, it is particularly important to study an application development method that can simplify the real-time collaboration application development process, improve development efficiency and application performance, and ensure user privacy and data security. Summary of the invention
[0003] The present disclosure provides a Flutter-based application development method, apparatus, device, and storage medium.
[0004] According to a first aspect of the present disclosure, a Flutter-based application development method is provided. The method comprises:
[0005] Configure the Flutter development environment, set the project structure and project configuration files;
[0006] Create a Flutter project according to the project structure and project configuration file; wherein the Flutter project includes a directory corresponding to each business module;
[0007] Write the business function code corresponding to the business module according to the preset implementation method in the corresponding directory of each business module to generate each business module;
[0008] Build UI interfaces using responsive design methods based on pre-established UI component libraries;
[0009] The business modules and UI interfaces are packaged to generate application installation packages and published to various platforms.
[0010] In some implementations of the first aspect, the business module includes:
[0011] Real-time collaboration core module, standardized component module, permission management module, version control module, cross-platform support module, plug-in management module, data security and privacy settings module.
[0012] In some implementations of the first aspect, the real-time collaboration core module includes a data synchronization module and a conflict handling module; wherein:
[0013] The data synchronization module is used to achieve real-time data synchronization through the WebSocket protocol and data merging strategy;
[0014] The conflict handling module is used to adopt an optimistic concurrency control strategy and interact with the data synchronization module and the plug-in management module to avoid data conflicts when multiple users operate on the same data and merge operations performed by multiple users on the same data;
[0015] The standardized component module is used to create a standardized component library and synchronously update the status of each component in the standardized component library through a status management tool;
[0016] The cross-platform support module is used to identify different platforms and perform adaptation and optimization for different platforms.
[0017] In some implementations of the first aspect, the method of avoiding data conflicts when multiple users operate on the same data and merging operations performed by multiple users on the same data by interacting with the data synchronization module and the plug-in management module includes:
[0018] The data version number is checked before executing the user operation; if the data version numbers are consistent, the user operation is executed and the data version number is updated through the data synchronization module; if the data version numbers are inconsistent, the data conflict is detected by the data synchronization module using a conflict detection algorithm and the data conflict is sent to the plug-in management module for processing, so that the plug-in management module can resolve the data conflict using a conflict resolution algorithm and return the resolution result to the data synchronization module, and the operations performed by multiple users on the same data are merged through the data synchronization module.
[0019] In some implementations of the first aspect, the plug-in management module is used to interact the custom plug-in with the real-time collaboration core module and the standardized component module through a standard API, and to manage the custom plug-in;
[0020] The authority management module is used to assign corresponding operation authorities to different users;
[0021] The data security and privacy setting module is used to ensure the security of data transmission through an end-to-end encryption method, and is also used to ensure that users can set data sharing scope and collaboration permissions as needed through privacy setting options;
[0022] The version control module is used to record the historical versions of application changes so that users can view, compare or return to the historical versions.
[0023] In some implementations of the first aspect, the plug-in management module is used to interact the custom plug-in with the real-time collaboration core module and the standardized component module through a standard API, including:
[0024] The plug-in management module is used to create custom plug-ins according to the developer's specific needs, and add the custom plug-ins to the standardized component library in the standardized component module to expand the functions of each component in the application; it is also used to interact the custom plug-in with the real-time collaboration core module through the standard API to achieve real-time data synchronization and avoid data conflicts.
[0025] In some possible implementations of the first aspect, before packaging the business module and the UI interface to generate an application installation package and publishing it to each platform, the process includes:
[0026] Test each business module separately;
[0027] If all tests are successful, use the Flutter command line tool to package the business module and UI interface to generate an application installation package and publish it to each platform;
[0028] If there is a test failure, repair the business function code corresponding to the business module that failed the test, and repeat the test on the repaired business module until the test succeeds.
[0029] According to a second aspect of the present disclosure, a Flutter-based application development device is provided. The device includes:
[0030] A Flutter project creation module is used to configure the Flutter development environment, set the project structure and project configuration files; create a Flutter project according to the project structure and project configuration files; wherein the Flutter project includes a directory corresponding to each business module;
[0031] A business program generation module, used to write business function codes corresponding to the business modules according to a preset implementation method in the corresponding directories of the business modules to generate each business module;
[0032] A UI interface building module is used to build a UI interface using a responsive design method based on a pre-established UI component library;
[0033] The application publishing module is used to package the business module and UI interface to generate an application installation package and publish it to various platforms.
[0034] According to a third aspect of the present disclosure, an electronic device is provided. The electronic device includes: at least one processor; and a memory connected to the at least one processor in communication; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the method described above.
[0035] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, where the computer instructions are used to cause a computer to execute the method as described above.
[0036] In the present disclosure, the Flutter development environment is configured, and the project structure and project configuration files are set; a Flutter project is created according to the project structure and project configuration files; wherein the Flutter project includes the corresponding directories of each business module; the business function codes corresponding to the business modules are written according to the preset implementation methods under the corresponding directories of each business module to generate each business module; a UI interface is established using a responsive design method according to a pre-established UI component library; each business module and UI interface is packaged to generate an application installation package and published to each platform. In this way, the development process of multi-person real-time collaborative applications is simplified, development efficiency and application performance are improved, and user privacy and data security are guaranteed.
[0037] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, among which:
[0039] Figure 1 A flowchart of a Flutter-based application development method provided by an embodiment of the present disclosure is shown;
[0040] Figure 2 A structural diagram of an application development device based on Flutter provided in an embodiment of the present disclosure is shown;
[0041] Figure 3 A block diagram of an exemplary electronic device capable of implementing an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0043] In addition, the term "and / or" in this article is only a description of the association relationship between the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0044] In response to the problems arising in the background technology, the embodiments of the present disclosure provide an application development method and device based on Flutter. Specifically, configure the Flutter development environment, set the project structure and project configuration file; create a Flutter project according to the project structure and project configuration file; wherein the Flutter project includes a directory corresponding to each business module; write the business function code corresponding to the business module according to the preset implementation method under the directory corresponding to each business module, and generate each business module; establish a UI interface using a responsive design method based on a pre-established UI component library; package each business module and UI interface to generate an application installation package and publish it to each platform. In this way, the development process of multi-person real-time collaborative applications is simplified, the development efficiency and application performance are improved, and user privacy and data security are guaranteed.
[0045] The following describes in detail the Flutter-based application development method and device provided by the embodiments of the present disclosure through specific embodiments in conjunction with the accompanying drawings.
[0046] Figure 1 A flowchart of a Flutter-based application development method provided in an embodiment of the present disclosure is shown. The method 100 includes the following steps:
[0047] S110, configure the Flutter development environment, set the project structure and project configuration file; create a Flutter project according to the project structure and project configuration file; wherein the Flutter project includes a directory corresponding to each business module.
[0048] In some embodiments, the Flutter development environment is configured to ensure that applications can be developed and tested on Android, iOS, and Web platforms.
[0049] S120, writing the business function code corresponding to the business module according to the preset implementation method in the directory corresponding to each business module to generate each business module.
[0050] In some embodiments, the business module includes:
[0051] Real-time collaboration core module, standardized component module, permission management module, version control module, cross-platform support module, plug-in management module, data security and privacy settings module.
[0052] In some embodiments, the real-time collaboration core module includes a data synchronization module and a conflict handling module; wherein,
[0053] The data synchronization module is used to achieve real-time data synchronization through the WebSocket protocol and data merging strategy, ensuring that operations of multiple users on the same data on different devices can be reflected in a timely manner;
[0054] The conflict handling module is used to adopt an optimistic concurrency control strategy and interact with the data synchronization module and the plug-in management module to avoid data conflicts when multiple users operate on the same data and merge operations performed by multiple users on the same data.
[0055] In some embodiments, by interacting with the data synchronization module and the plug-in management module, data conflicts when multiple users operate on the same data are avoided and operations performed by multiple users on the same data are merged, including:
[0056] Check the data version number before executing the user operation; if the data version numbers are consistent, execute the user operation and update the data version number through the data synchronization module; if the data version numbers are inconsistent, use the conflict detection algorithm to detect data conflicts through the data synchronization module and send the data conflicts to the plug-in management module for processing, so that the plug-in management module can use the conflict resolution algorithm (such as a merge strategy based on timestamps) to resolve the data conflicts and return the resolution results to the data synchronization module, and merge the operations performed by multiple users on the same data through the data synchronization module;
[0057] Specifically, the conflict handling module adopts an optimistic concurrency control strategy, that is, it assumes that data conflicts will not occur in most cases during the execution of user operations. Therefore, it is only necessary to detect whether data conflicts occur before executing user operations. The specific method for detecting data conflicts is as follows:
[0058] For a single application, the version number of the data to be operated (i.e., the same data mentioned below) is checked before executing the user operation; if the version number of the data is consistent with the data version number checked by other users before the data synchronization module in the single application operates on the same data (indicating that there is no data conflict before the user and other users operate on the same data), the data synchronization module in the application executes the user operation, and at the same time updates the version number of the data to a new data version number by adding a timestamp, using a hash value, etc., and sends it to the data synchronization module in the application used by other users through an API interface or communication protocol, so as to synchronize the operations performed by the user and other users on the same data later;
[0059] If the version number of the data is inconsistent with the data version number checked by other users before the data synchronization module in a single application operates on the same data (indicating that a data conflict occurs before the user and other users operate on the same data), the data synchronization module in the application uses a conflict detection algorithm to detect the data conflict generated before the user and other users operate on the same data, and sends the data conflict to the plug-in management module of the application for processing; the plug-in management module of the application uses a conflict resolution algorithm (such as a merge strategy based on a timestamp) to resolve the data conflict and returns the resolution result (i.e., the data state after the data conflict is resolved) to the data synchronization module of the application, and the data synchronization module merges the data generated before the user and other users operate on the same data according to the resolution result (for example, two users modify different parts of the same document, and the data synchronization module merges these modifications into the same document based on the merge strategy of a timestamp) and assigns a new data version number to the merged data by adding a timestamp, using a hash value, etc., to ensure that the merged data has the latest version identification; the new data version number and the merged data are sent to the data synchronization modules in the applications used by other users respectively through an API interface or a communication protocol, so as to synchronize the operations performed by the user and other users on the same data later;
[0060] Furthermore, the conflict handling modules in the applications used by other users respectively check the version number of the data to be operated before executing the corresponding user's operation on the same data, and send the checked data version number to the data synchronization module in the single user through the API interface or communication protocol;
[0061] The data version number is an identifier used to identify the data status. It can be generated by a timestamp or hash value, etc. It can reflect the status or modification history of the data at a certain point in time.
[0062] The new data version number can be an incrementing numeric value, the current timestamp, or other unique identifier.
[0063] In some embodiments, the standardized component module is used to create a standardized component library and synchronously update the status of each component in the standardized component library through a status management tool;
[0064] Furthermore, the standardized component library includes real-time collaboration components such as shared text editors and shared whiteboards;
[0065] State management tools include Provider and Riverpod;
[0066] The status of each component in the standardized component library is updated synchronously through the status management tool using real-time communication technology.
[0067] In some embodiments, the standardized component library allows developers to extend and customize component functions according to specific needs, and has extensibility and reusability.
[0068] In some embodiments, the cross-platform support module is used to identify different platforms and perform adaptation and optimization for different platforms.
[0069] In some embodiments, the cross-platform support module may also use a platform channel (Method Channel) to interact with native code to implement platform-specific functions.
[0070] In some embodiments, a plug-in management module is used to interact the custom plug-in with the real-time collaboration core module and the standardized component module through a standard API and manage the custom plug-in;
[0071] Furthermore, custom plug-ins are managed, including:
[0072] Download and install plugins, enable or disable plugins, and update plugins.
[0073] In some embodiments, the plug-in management module is used to interact the custom plug-in with the real-time collaboration core module and the standardized component module through the standard API, including:
[0074] The plug-in management module is used to create custom plug-ins according to the developer's specific needs, and add the custom plug-ins to the standardized component library in the standardized component module to expand the functions of each component in the application; it is also used to interact the custom plug-ins with the real-time collaboration core module through the standard API to achieve real-time data synchronization and avoid data conflicts.
[0075] In some embodiments, the permission management module is used to assign corresponding operation permissions to different users, such as viewing, editing, and management permissions.
[0076] In some embodiments, the permission management module is also used to perform user identity authentication using third-party services such as Firebase Auth.
[0077] In some embodiments, the data security and privacy setting module is used to ensure the security of data transmission through end-to-end encryption methods (such as AES, RSA), and is also used to ensure that users set data sharing scope and collaboration permissions as needed through privacy setting options.
[0078] In some embodiments, the version control module is used to record the historical versions of application changes so that users can view, compare or return to the historical versions;
[0079] Record the historical version of application changes, including:
[0080] Use persistent storage (such as SQLite, Hive) to save historical version data of application changes.
[0081] S130, establishing a UI interface using a responsive design method according to a pre-established UI component library.
[0082] In some embodiments, the UI component library can ensure that the UI interface style and interaction logic are consistent;
[0083] The responsive design method ensures that the UI interface can adapt to the screen size and resolution of different devices to provide users with the best experience.
[0084] S140, packaging the business module and UI interface to generate an application installation package and publishing it to various platforms.
[0085] In some embodiments, before packaging the business module and the UI interface to generate an application installation package and publishing it to each platform, the process includes:
[0086] Test each business module separately;
[0087] If all tests are successful, use the Flutter command line tool to package the business module and UI interface to generate an application installation package and publish it to each platform;
[0088] If there is a test failure, repair the business function code corresponding to the business module that failed the test, and repeat the test on the repaired business module until the test succeeds.
[0089] According to the embodiments of the present disclosure, configure the Flutter development environment, set the project structure and project configuration file; create a Flutter project according to the project structure and project configuration file; wherein the Flutter project includes a directory corresponding to each business module; write the business function code corresponding to the business module according to the preset implementation method under the directory corresponding to each business module, and generate each business module; establish a UI interface using a responsive design method based on a pre-established UI component library; package each business module and UI interface to generate an application installation package and publish it to each platform. In this way, the development process of multi-person real-time collaborative applications is simplified, the development efficiency and application performance are improved, and user privacy and data security are guaranteed.
[0090] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present disclosure is not limited by the order of the actions described, because according to the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present disclosure.
[0091] The above is an introduction to the method embodiment. The following is a further explanation of the scheme disclosed in the present invention through an apparatus embodiment.
[0092] Figure 2 The structure diagram of a Flutter-based application development device provided by an embodiment of the present disclosure is shown. The device 200 includes:
[0093] The Flutter project creation module 210 is used to configure the Flutter development environment, set the project structure and project configuration file; create a Flutter project according to the project structure and project configuration file; wherein the Flutter project includes a directory corresponding to each business module.
[0094] The business program generation module 220 is used to write the business function code corresponding to the business module according to the preset implementation method in the corresponding directory of each business module to generate each business module.
[0095] In some embodiments, module 220 is specifically configured to:
[0096] Business modules include:
[0097] Real-time collaboration core module, standardized component module, permission management module, version control module, cross-platform support module, plug-in management module, data security and privacy settings module.
[0098] In some embodiments, module 220 is further configured to:
[0099] The real-time collaboration core module includes a data synchronization module and a conflict handling module; wherein,
[0100] The data synchronization module is used to achieve real-time data synchronization through the WebSocket protocol and data merging strategy;
[0101] The conflict handling module is used to adopt an optimistic concurrency control strategy and interact with the data synchronization module and the plug-in management module to avoid data conflicts when multiple users operate on the same data and merge operations performed by multiple users on the same data;
[0102] The standardized component module is used to create a standardized component library and synchronously update the status of each component in the standardized component library through a status management tool;
[0103] The cross-platform support module is used to identify different platforms and perform adaptation and optimization for different platforms.
[0104] In some embodiments, module 220 is further configured to:
[0105] The method avoids data conflicts when multiple users operate on the same data and merges operations performed by multiple users on the same data by interacting with the data synchronization module and the plug-in management module, including:
[0106] The data version number is checked before executing the user operation; if the data version numbers are consistent, the user operation is executed and the data version number is updated through the data synchronization module; if the data version numbers are inconsistent, the data conflict is detected by the data synchronization module using a conflict detection algorithm and the data conflict is sent to the plug-in management module for processing, so that the plug-in management module can resolve the data conflict using a conflict resolution algorithm and return the resolution result to the data synchronization module, and the operations performed by multiple users on the same data are merged through the data synchronization module.
[0107] In some embodiments, module 220 is further configured to:
[0108] The plug-in management module is used to interact the custom plug-in with the real-time collaboration core module and the standardized component module through the standard API, and manage the custom plug-in;
[0109] The authority management module is used to assign corresponding operation authorities to different users;
[0110] The data security and privacy setting module is used to ensure the security of data transmission through an end-to-end encryption method, and is also used to ensure that users can set data sharing scope and collaboration permissions as needed through privacy setting options;
[0111] The version control module is used to record the historical versions of application changes so that users can view, compare or return to the historical versions.
[0112] In some embodiments, module 220 is further configured to:
[0113] The plug-in management module is used to interact the custom plug-in with the real-time collaboration core module and the standardized component module through the standard API, including:
[0114] The plug-in management module is used to create custom plug-ins according to the developer's specific needs, and add the custom plug-ins to the standardized component library in the standardized component module to expand the functions of each component in the application; it is also used to interact the custom plug-in with the real-time collaboration core module through the standard API to achieve real-time data synchronization and avoid data conflicts.
[0115] The UI interface building module 230 is used to build the UI interface using a responsive design method according to a pre-built UI component library.
[0116] The application publishing module 240 is used to package the business module and the UI interface to generate an application installation package and publish it to various platforms.
[0117] In some embodiments, module 240 is specifically configured to:
[0118] Before packaging the business module and UI interface to generate an application installation package and publishing it to each platform, it includes:
[0119] Test each business module separately;
[0120] If all tests are successful, use the Flutter command line tool to package the business module and UI interface to generate an application installation package and publish it to each platform;
[0121] If there is a test failure, repair the business function code corresponding to the business module that failed the test, and repeat the test on the repaired business module until the test succeeds.
[0122] Understandably, Figure 2 Each module / unit in the detection device 200 shown has the function of implementing each step in the detection method 100 provided in the embodiment of the present disclosure and can achieve its corresponding technical effect. For the sake of brevity, it will not be repeated here.
[0123] Figure 3A block diagram of an exemplary electronic device capable of implementing an embodiment of the present disclosure is shown. The electronic device 300 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device 300 may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0124] like Figure 3 As shown, the electronic device 300 includes a computing unit 301, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 302 or a computer program loaded from a storage unit 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 can also be stored. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An I / O interface 305 is also connected to the bus 304.
[0125] A number of components in the electronic device 300 are connected to the I / O interface 305, including: an input unit 306, such as a keyboard, a mouse, etc.; an output unit 307, such as various types of displays, speakers, etc.; a storage unit 308, such as a disk, an optical disk, etc.; and a communication unit 309, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 309 allows the electronic device 300 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0126] The computing unit 301 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 301 performs the various methods and processes described above, such as method 100. For example, in some embodiments, the method 100 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 308. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 300 via the ROM 302 and / or the communication unit 309. When the computer program is loaded into the RAM 303 and executed by the computing unit 301, one or more steps of the method 100 described above may be performed. Alternatively, in other embodiments, the computing unit 301 may be configured to perform the method 100 in any other appropriate manner (e.g., by means of firmware).
[0127] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0128] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0129] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0130] It should be noted that the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute method 100 and achieve the corresponding technical effect achieved by executing the method in the embodiment of the present disclosure. For the sake of concise description, they are not repeated here.
[0131] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0132] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0133] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0134] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0135] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A Flutter-based application development method, characterized in that: include: Configure the Flutter development environment, set the project structure and project configuration files; Create a Flutter project according to the project structure and project configuration file; wherein the Flutter project includes a directory corresponding to each business module; Write the business function code corresponding to the business module according to the preset implementation method in the corresponding directory of each business module to generate each business module; Build UI interfaces using responsive design methods based on pre-established UI component libraries; The business modules and UI interfaces are packaged to generate application installation packages and published to various platforms.
2. The method according to claim 1, characterized in that The business module includes: Real-time collaboration core module, standardized component module, permission management module, version control module, cross-platform support module, plug-in management module, data security and privacy settings module.
3. The method according to claim 2, characterized in that The real-time collaboration core module includes a data synchronization module and a conflict handling module; wherein, The data synchronization module is used to achieve real-time data synchronization through the WebSocket protocol and data merging strategy; The conflict handling module is used to adopt an optimistic concurrency control strategy and interact with the data synchronization module and the plug-in management module to avoid data conflicts when multiple users operate on the same data and merge operations performed by multiple users on the same data; The standardized component module is used to create a standardized component library and synchronously update the status of each component in the standardized component library through a status management tool; The cross-platform support module is used to identify different platforms and perform adaptation and optimization for different platforms.
4. The method according to claim 3, characterized in that The method avoids data conflicts when multiple users operate on the same data and merges operations performed by multiple users on the same data by interacting with the data synchronization module and the plug-in management module, including: Check the data version number before executing the user operation; if the data version numbers are consistent, execute the user operation and update the data version number through the data synchronization module; if the data version numbers are inconsistent, use the conflict detection algorithm through the data synchronization module to detect data conflicts and send the data conflicts to the plug-in management module for processing, so that the plug-in management module can use the conflict resolution algorithm to resolve the data conflicts and return the resolution results to the data synchronization module, and merge the operations performed by multiple users on the same data through the data synchronization module.
5. The method according to claim 2, characterized in that: The plug-in management module is used to interact the custom plug-in with the real-time collaboration core module and the standardized component module through the standard API, and manage the custom plug-in; The authority management module is used to assign corresponding operation authorities to different users; The data security and privacy setting module is used to ensure the security of data transmission through an end-to-end encryption method, and is also used to ensure that users can set data sharing scope and collaboration permissions as needed through privacy setting options; The version control module is used to record the historical versions of application changes so that users can view, compare or return to the historical versions.
6. The method according to claim 5, characterized in that The plug-in management module is used to interact the custom plug-in with the real-time collaboration core module and the standardized component module through the standard API, including: The plug-in management module is used to create custom plug-ins according to the developer's specific needs, and add the custom plug-ins to the standardized component library in the standardized component module to expand the functions of each component in the application; it is also used to interact the custom plug-in with the real-time collaboration core module through the standard API to achieve real-time data synchronization and avoid data conflicts.
7. The method according to claim 1, characterized in that Before the business module and UI interface are packaged to generate an application installation package and published to each platform, the process includes: Test each business module separately; If all tests are successful, use the Flutter command line tool to package the business module and UI interface to generate an application installation package and publish it to each platform; If there is a test failure, repair the business function code corresponding to the business module that failed the test, and repeat the test on the repaired business module until the test succeeds.
8. A Flutter-based application development device, characterized in that: include: A Flutter project creation module is used to configure the Flutter development environment, set the project structure and project configuration files; create a Flutter project according to the project structure and project configuration files; wherein the Flutter project includes a directory corresponding to each business module; A business program generation module, used to write business function codes corresponding to the business modules according to a preset implementation method in the corresponding directories of the business modules to generate each business module; A UI interface building module is used to build a UI interface using a responsive design method based on a pre-established UI component library; The application publishing module is used to package the business module and UI interface to generate an application installation package and publish it to various platforms.
9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.
