Page display method, device, storage medium and electronic device

By creating a new page independent of the target widget in the Flutter framework and displaying its error message, the problem of ErrorWidget size is solved, and a complete display and flexible display form is achieved, which improves the user interface effect.

CN111796897BActive Publication Date: 2024-12-31BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010635734.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-03
Publication Date
2024-12-31
Estimated Expiration
2040-12-31

AI Technical Summary

Technical Problem

Under the Flutter framework, the size of the ErrorWidget is limited by the error Widget itself, and the error information cannot be fully displayed, resulting in poor user interface display effect.

Method used

Create a new page independent of the target widget, and display the error information of the target widget through the new page. The size of the new page is not limited by the target widget, and supports full screen or floating display. Use the exception detection module to obtain error information and display according to the display. Screen size resize page.

Benefits of technology

It realizes a complete display of the target widget error information, improves the page display effect, and provides a flexible display form and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111796897B_ABST
    Figure CN111796897B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a page display method, device, storage medium and electronic device, and belongs to the field of computer technology. The method includes: detecting an error in a target widget included in a user interface, obtaining error information of the target widget, wherein the user interface is composed of multiple widgets; creating a new page independent of the target widget; and displaying the error information of the target widget through the new page. Since the newly created new page does not depend on the target widget and is completely independent of the target widget, the information display is not limited by the size of the target widget, is more flexible, and can fully display the error information of the target widget, achieving a better page display effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a page display method, device, storage medium and electronic device. Background Art

[0002] A user interface (UI) can usually be composed of various widgets. For example, the user interface implemented based on Flutter, a cross-platform mobile user interface framework developed by Google, is composed of various widgets.

[0003] In the Flutter framework, when an error is detected in a widget included in a page presented by a user interface, Flutter replaces the erroneous widget with an ErrorWidget and displays the error information of the widget through the ErrorWidget.

[0004] With respect to the above page display method, the size of the ErrorWidget is limited by the size of the Widget itself where the error occurs, and may not be able to display the complete error information, resulting in the problem that the user may not be able to see the complete error information. The effect of this page display method is poor. Summary of the invention

[0005] The present disclosure provides a page display method, device, storage medium and electronic device. Since the newly created new page does not depend on the target widget and is completely independent of the target widget, the information display is not limited by the size of the target widget, which is more flexible and can fully display the error information of the target widget, thereby achieving a better page display effect. The technical solution of the present disclosure is as follows:

[0006] According to a first aspect of an embodiment of the present disclosure, a page display method is provided, including:

[0007] Detecting that an error occurs in a target widget included in a user interface, and obtaining error information of the target widget, wherein the user interface is composed of a plurality of widgets;

[0008] Create a new page independent of the target widget;

[0009] The error information of the target widget is displayed through the new page.

[0010] In a possible implementation, the error information of the target widget includes: call stack information when an error occurs in the target widget; the method further includes:

[0011] Calling a preset first page building tool to obtain custom page content input by a user; wherein the custom page content is used to indicate that an error occurs in the target widget;

[0012] The custom page content is displayed through the new page in a display form that covers the call stack information.

[0013] In a possible implementation manner, displaying the error information of the target widget through the new page includes:

[0014] In response to the received full-screen display instruction, the new page is displayed in full screen; the error message is displayed by the new page displayed in full screen; or,

[0015] In response to the received floating display instruction, the new page is displayed in a floating manner in a top-level display in a designated area on the display screen of the electronic device; and the error information is displayed through the new page displayed in the floating manner.

[0016] In a possible implementation, the method further includes:

[0017] In the target application corresponding to the user interface, an exception detection module is set; the exception detection module is set in a code module corresponding to the entry function of the target application;

[0018] During the running of the target application, the target widget is detected and determined by the abnormality detection module.

[0019] In a possible implementation manner, the obtaining error information of the target widget includes:

[0020] The error information of the target widget is obtained through the exception capture function included in the exception detection module.

[0021] In a possible implementation manner, displaying the error information of the target widget through the new page includes:

[0022] Get the display screen size of the electronic device;

[0023] Determining the size of the new page according to the data volume of the error information and the size of the display screen;

[0024] Displaying the new page on the display screen of the electronic device according to the determined size;

[0025] The new page displays complete error information generated when an error occurs in the target widget.

[0026] In a possible implementation, the creating a new page independent of the target widget includes:

[0027] Calling a preset page start function to create a new page independent of the target widget;

[0028] The page start function creates the new page through a preset second page building tool, and controls the page to jump to the new page through a push function of a navigation tool.

[0029] According to a second aspect of an embodiment of the present disclosure, a page display device is provided, including:

[0030] A first acquisition unit is configured to detect that an error occurs in a target widget included in a user interface, and acquire error information of the target widget, wherein the user interface is composed of a plurality of widgets;

[0031] A creation unit, configured to create a new page independent of the target widget;

[0032] The display unit is configured to display the error information of the target widget through the new page.

[0033] In a possible implementation, the error information of the target widget includes: call stack information when an error occurs in the target widget; the device further includes:

[0034] A second acquisition unit is configured to call a preset first page building tool to acquire custom page content input by a user; wherein the custom page content is used to indicate that an error occurs in the target widget;

[0035] The display unit is further configured to display the custom page content through the new page in a display form that covers the call stack information.

[0036] In one possible implementation, the display unit is configured to, in response to a received full-screen display instruction, display the new page in full screen; display the error message through the new page displayed in full screen; or, in response to a received floating display instruction, display the new page in a floating manner in a top-level display in a designated area on the display screen of the electronic device; display the error message through the new page displayed in a floating manner.

[0037] In a possible implementation manner, the device further includes:

[0038] The detection unit is configured to set an exception detection module in a target application corresponding to the user interface; the exception detection module is set in a code module corresponding to an entry function of the target application; during the operation of the target application, the target widget is detected and determined by the exception detection module.

[0039] In a possible implementation manner, the first acquisition unit is configured to acquire error information of the target widget through an exception capture function included in the exception detection module.

[0040] In a possible implementation, the display unit is configured to obtain the size of a display screen of an electronic device; determine the size of the new page according to the amount of data of the error information and the size of the display screen; and display the new page on the display screen of the electronic device according to the determined size; wherein the new page displays the complete error information generated when an error occurs in the target widget.

[0041] In a possible implementation, the creation module is configured to call a preset page start function to create a new page independent of the target widget;

[0042] The page start function creates the new page through a preset second page building tool, and controls the page to jump to the new page through a push function of a navigation tool.

[0043] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0044] processor;

[0045] a memory for storing instructions executable by the processor;

[0046] The processor is configured to execute the instructions to implement the page display method as described in the first aspect above.

[0047] According to a fourth aspect of an embodiment of the present disclosure, a storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the page display method described in the first aspect above.

[0048] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device can execute the page display method described in the first aspect above.

[0049] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:

[0050] When an error occurs in a target widget included in the user interface, the disclosed embodiment creates a new page independent of the target widget, and displays the error information of the target widget through the new page. Since the new page does not depend on the target widget and is completely independent of the target widget, the information display is not limited by the size of the target widget, and is more flexible. The error information of the target widget can be fully displayed, achieving a better page display effect.

[0051] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0053] Figure 1 It is a schematic diagram of an implementation environment involved in a page display method according to an exemplary embodiment.

[0054] Figure 2 The figure is a flow chart of a page display method according to an exemplary embodiment.

[0055] Figure 3 The figure is a flow chart of a page display method according to an exemplary embodiment.

[0056] Figure 4 The diagram is a schematic diagram of a page according to an exemplary embodiment.

[0057] Figure 5 The figure is a flow chart of a page display method according to an exemplary embodiment.

[0058] Figure 6 The diagram is a schematic diagram of a page according to an exemplary embodiment.

[0059] Figure 7 The figure is a block diagram of a page display device according to an exemplary embodiment.

[0060] Figure 8 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0061] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0062] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0063] The user information involved in the present disclosure may be information authorized by the user or fully authorized by all parties.

[0064] Before explaining the embodiments of the present disclosure in detail, some abbreviations or terms that may be involved in the embodiments of the present disclosure are first introduced.

[0065] Widget: It can be called a widget or component.

[0066] Among them, Flutter is a cross-platform mobile UI framework developed by Google, which can quickly build high-quality native user interfaces on iOS and Android operating systems. Since Flutter can match native performance, it has gradually been applied to projects. For example, users can use Flutter to efficiently build exquisite multi-platform applications.

[0067] The core idea of ​​Flutter is to build UI with widgets. In other words, the core design idea of ​​Flutter is that everything is a widget. In the world of Flutter, concepts including view, controller, activity, application, layout, etc. are all built on widgets.

[0068] From the Flutter architecture diagram, we can see that Widget is the basis of the entire view description. That is, Widget is an abstract description of Flutter functions, the configuration information of the view, and also the mapping of data. It is the most basic concept in the Flutter development framework. Unlike other frameworks that separate attributes such as View, Controller, Activity, Application, and Layout, these are all Widgets in Flutter.

[0069] Exemplarily, a Widget may be defined as: a structural element (such as a button); a text style element (such as a font or color, etc.), etc., which is not specifically limited in the embodiments of the present disclosure.

[0070] The following is an introduction to the implementation environment of the page display method provided in the embodiment of the present disclosure.

[0071] See also Figure 1 , the implementation environment includes: a user 101 and an electronic device 102.

[0072] The electronic device 102 is used to execute the page display method provided by the embodiment of the present disclosure. For example, the electronic device 102 may be a computer device with a display screen.

[0073] Exemplarily, the electronic device 102 may generally be a mobile terminal.

[0074] In one possible implementation, the mobile terminal includes but is not limited to: smart phones, tablet computers, laptop computers, e-readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, etc., and the embodiments of the present disclosure do not specifically limit this.

[0075] Based on the above implementation environment, the embodiment of the present disclosure provides a personalized page display solution, that is, when an error occurs in a Widget included in the user interface, the solution will create a new page, and the new page is independent of the Widget where the error occurs, so the size of the new page is not limited by the size of the Widget where the error occurs. This solves the problem in the related art that when using ErrorWidget to replace the Widget where the error occurs, the size of the ErrorWidget is limited by the Widget where the error occurs, that is, the maximum size of the ErrorWidget is equal to the size of the Widget where the error occurs. If the size of the Widget where the error occurs is very small, then the ErrorWidget may not be able to display the complete error information. In addition, the content displayed on the new page also supports users to freely customize it. In addition, the display form of the new page also supports users to freely customize it, such as full-screen display or middle floating display, etc., to achieve the purpose of improving user experience.

[0076] The page display scheme provided by the embodiment of the present disclosure is explained in detail through the following embodiments.

[0077] Figure 2 is a flow chart of a page display method according to an exemplary embodiment. Figure 2 As shown, this method is used to Figure 1 The electronic device shown includes the following steps.

[0078] In step 201, it is detected that an error occurs in a target widget included in a user interface, and error information of the target widget is obtained, wherein the user interface is composed of a plurality of widgets.

[0079] In step 202, a new page independent of the target widget is created.

[0080] In step 203, the error information of the target widget is displayed through the new page.

[0081] The method provided by the embodiment of the present disclosure, when detecting that an error occurs in a target widget included in a user interface, the embodiment of the present disclosure creates a new page independent of the target widget, and displays the error information of the target widget through the new page. Since the new page does not depend on the target widget and is completely independent of the target widget, the information display is not limited by the size of the target widget, and is more flexible, and the error information of the target widget can be fully displayed, achieving a better page display effect.

[0082] In a possible implementation, the error information of the target widget includes: call stack information when an error occurs in the target widget; the method further includes:

[0083] Calling a preset first page building tool to obtain custom page content input by a user; wherein the custom page content is used to indicate that an error occurs in the target widget;

[0084] The custom page content is displayed through the new page in a display form that covers the call stack information.

[0085] In a possible implementation manner, displaying the error information of the target widget through the new page includes:

[0086] In response to the received full-screen display instruction, the new page is displayed in full screen; the error message is displayed by the new page displayed in full screen; or,

[0087] In response to the received floating display instruction, the new page is displayed in a floating manner in a designated area on the display screen of the electronic device in a top-level display mode; and the error information is displayed through the new page displayed in a floating manner.

[0088] In a possible implementation, the method further includes:

[0089] In the target application corresponding to the user interface, an exception detection module is set; the exception detection module is set in a code module corresponding to the entry function of the target application;

[0090] During the running of the target application, the target widget is detected and determined by the abnormality detection module.

[0091] In a possible implementation manner, the obtaining error information of the target widget includes:

[0092] The error information of the target widget is obtained through the exception capture function included in the exception detection module.

[0093] In a possible implementation manner, displaying the error information of the target widget through the new page includes:

[0094] Get the display screen size of the electronic device;

[0095] Determining the size of the new page according to the data volume of the error information and the size of the display screen;

[0096] Displaying the new page on the display screen of the electronic device according to the determined size;

[0097] The new page displays complete error information generated when an error occurs in the target widget.

[0098] In a possible implementation, the creating a new page independent of the target widget includes:

[0099] Calling a preset page start function to create a new page independent of the target widget;

[0100] The page start function creates the new page through a preset second page building tool, and controls the page to jump to the new page through a push function of a navigation tool.

[0101] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, which will not be described in detail here.

[0102] Figure 3 is a flow chart of a page display method according to an exemplary embodiment. Figure 3 As shown, this method is used to Figure 1 The electronic device shown includes the following steps.

[0103] In step 301, an exception detection module is set in a target application corresponding to the user interface; wherein the exception detection module is set in a code module corresponding to an entry function of the target application; during the operation of the target application, an error in a target widget included in the user interface is detected by the exception detection module.

[0104] In the disclosed embodiment, the widget where the error occurs is referred to as the target widget. The above-mentioned target application refers to the Flutter application, which is used to start the user interface at runtime. Among them, the user interface started by Flutter is usually composed of multiple widgets, which are usually organized in a tree structure (Widget tree). When an error occurs in any widget, Flutter will capture this exception through the exception detection module, and remind the user by displaying the error information on the display page, and help the user locate the cause of the error.

[0105] That is, the target application is provided with an exception detection module, and illustratively, the exception detection module is provided in the code module corresponding to the entry function of the target application; thus, during the operation of the target application, the target widget where an error occurs can be detected and determined by the exception detection module. The present disclosure can accurately detect the widget where an error occurs on the user interface by providing the exception detection module in the target application, that is, can accurately capture the exception, and provide convenience for the user to locate the cause of the error.

[0106] In one possible implementation, the entry function of the target application is the main function, and the exception detection module is the runZoned() method, that is, the internal code of the main function can be included in the runZoned() method to capture exceptions. The runZoned() method can specify a Zone for the execution object. The Zone represents the scope of an environment for code execution. For ease of understanding, the Zone can be likened to a code execution sandbox. Different sandboxes are isolated from each other. The sandbox can capture, intercept or modify some code behaviors. For example, the Zone can capture all unhandled exceptions.

[0107] In step 302, error information of the target widget is obtained through the exception capture function included in the exception detection module.

[0108] Exemplarily, the exception capture function is the onError function of the runZoned() method. That is, the error generated by the target application at runtime will be captured by the onError function of the runZoned() method, that is, the onError function will capture the error information of the target widget. In one possible implementation, the above error information may include various error information, such as call stack information when an error occurs in the target widget, to help the user locate the cause of the error. The embodiments of the present disclosure do not specifically limit this. The present disclosure uses the exception capture function included in the exception detection module to accurately obtain the error information of the widget where the error occurs, which provides convenience for the user to locate the cause of the error.

[0109] In step 303, a new page independent of the target widget is created.

[0110] In the disclosed embodiment, when an error occurs in the Widget, that is, when the onError function captures the error information, a new page CustomErrorPage will be created. It should be noted that since the newly created new page is completely independent of the target widget, the size of the new page is not limited by the size of the target widget, so the new page can display the complete error information, and the user will also be able to see the complete error information, which can help the user quickly and accurately locate the cause of the error.

[0111] As an example, creating a new page independent of the target widget includes: calling a preset page startup function to create a new page independent of the target widget; wherein the page startup function creates a new page through a preset second page building tool, and controls the page to jump to the new page through the push function of the navigation tool.

[0112] Exemplarily, the preset page launch function may be a launchCustomePage function, the preset second page building tool may be a builder of a Material PageRoute function, the navigation tool may be a Navigator, and the push function of the navigation tool may be a Navigator.push function, which is not specifically limited in the embodiments of the present disclosure.

[0113] The Material PageRoute function creates whatever content you want to display on the user interface, while the Navigator.push function navigates to a new page.

[0114] In step 304, the error information of the target widget is displayed through the new page.

[0115] In a possible implementation, the error information of the target widget includes: call stack information when an error occurs in the target widget; that is, CustomErrorPage displays the call stack information when an error occurs in the target widget by default, wherein: Figure 4 It is the default display format of CustomErrorPage. Figure 4 As shown, in addition to the call stack information when an error occurs, that is, the error stack, the new page may also include an error summary, that is, the content displayed on the upper part of the error stack, which is not specifically limited in the embodiment of the present disclosure.

[0116] The first point to be explained is that the embodiments of the present disclosure can support users to freely customize, such as implementing customized page display. That is, in a possible implementation, the error information of the target widget is displayed on a new page, including but not limited to the following two methods:

[0117] 3041. In response to the received full-screen display instruction, the new page is displayed in full screen; and error information of the target widget is displayed through the new page displayed in full screen.

[0118] In this manner, the user triggers a full-screen display operation, and the new page is then displayed in full screen on the display screen of the electronic device.

[0119] 3042. In response to the received floating display instruction, the new page is displayed in a floating manner in a designated area on the display screen of the electronic device in a top-level display mode; and the error information of the target widget is displayed through the floating new page.

[0120] For this method, the user triggers the floating display operation, and then the new page is displayed in a floating manner on the display screen of the electronic device. Among them, the meaning of the display method placed at the top layer is that when displayed at the front, the new page is displayed at the forefront of all layers and is not blocked by any layer. In addition, the designated area can be the middle part, upper half or lower half of the display screen of the electronic device, which is not specifically limited in the embodiments of the present disclosure.

[0121] Based on the above description, it can be seen that the embodiment of the present disclosure supports users to personalize the page display form of the new page, enriches the page display method, and improves the user experience.

[0122] The second point that needs to be explained is that in order to make the new page display the error information completely and avoid the new page occupying too much of the display screen of the electronic device, the size of the new page can also be calculated in the following way. That is, in a possible implementation, displaying the error information of the target widget through the new page includes: obtaining the display screen size of the electronic device; determining the size of the new page according to the data volume of the error information of the target widget and the display screen size; displaying the new page on the display screen of the electronic device according to the determined size; wherein the new page displays the complete error information generated when an error occurs in the target widget.

[0123] Through this measure, the new page can fully display the error information and avoid the new page from occupying too much of the display screen of the electronic device, which has a better effect.

[0124] The method provided by the embodiment of the present disclosure, when detecting that an error occurs in a target widget included in a user interface, the embodiment of the present disclosure creates a new page independent of the target widget, and displays the error information of the target widget through the new page. Since the new page does not depend on the target widget and is completely independent of the target widget, the information display is not limited by the size of the target widget, and is more flexible, and the error information of the target widget can be fully displayed, achieving a better page display effect.

[0125] In another embodiment, in addition to supporting the user to customize the page display form of the new page, the present embodiment also supports the user to freely customize the page content of the page. In other words, the present embodiment supports the user to redefine CustomErrorPage.builder to cover Figure 4 The default page content (i.e., error message) shown in the figure is used to implement customized page content to ensure user experience and make the page user-friendly. That is, in one possible implementation, after creating a new page independent of the target widget, see Figure 5 , the embodiment of the present disclosure further includes the following step 305:

[0126] 305 , calling a preset first page building tool to obtain custom page content input by a user; wherein the custom page content is used to indicate that an error has occurred in the target widget; and displaying the custom page content through the new page in a display form that covers the call stack information of the target widget.

[0127] Exemplarily, the preset first page builder tool is CustomErrorPage.builder. As an example, the custom page content can be such as Figure 6 The “Flutter error” shown is not specifically limited in the embodiments of the present disclosure.

[0128] The method provided by the embodiment of the present disclosure can personalize the page content displayed on the new page, thereby enriching the page display method.

[0129] Figure 7 is a block diagram of a page display device according to an exemplary embodiment. Figure 7 The device includes a first acquisition unit 701, a creation unit 702, and a display unit 703.

[0130] A first acquisition unit 701 is configured to detect that an error occurs in a target widget included in a user interface, and acquire error information of the target widget, wherein the user interface is composed of a plurality of widgets;

[0131] A creating unit 702 is configured to create a new page independent of the target widget;

[0132] The display unit 703 is configured to display the error information of the target widget through the new page.

[0133] The device provided by the embodiment of the present disclosure, when detecting that an error occurs in a target widget included in a user interface, creates a new page independent of the target widget, and displays the error information of the target widget through the new page. Since the new page does not depend on the target widget and is completely independent of the target widget, the information display is not limited by the size of the target widget, is more flexible, and can fully display the error information of the target widget, achieving a better page display effect.

[0134] In a possible implementation, the error information of the target widget includes: call stack information when an error occurs in the target widget; the device further includes:

[0135] A second acquisition unit is configured to call a preset first page building tool to acquire custom page content input by a user; wherein the custom page content is used to indicate that an error occurs in the target widget;

[0136] The display unit is further configured to display the custom page content through the new page in a display form that covers the call stack information.

[0137] In one possible implementation, the display unit is configured to, in response to a received full-screen display instruction, display the new page in full screen; display the error message through the new page displayed in full screen; or, in response to a received floating display instruction, display the new page in a floating manner in a top-level display in a designated area on the display screen of the electronic device; display the error message through the new page displayed in a floating manner.

[0138] In a possible implementation manner, the device further includes:

[0139] The detection unit is configured to set an exception detection module in a target application corresponding to the user interface; the exception detection module is set in a code module corresponding to an entry function of the target application; during the operation of the target application, the target widget is detected and determined by the exception detection module.

[0140] In a possible implementation manner, the first acquisition unit is configured to acquire error information of the target widget through an exception capture function included in the exception detection module.

[0141] In a possible implementation, the display unit is configured to obtain the size of a display screen of an electronic device; determine the size of the new page according to the amount of data of the error information and the size of the display screen; and display the new page on the display screen of the electronic device according to the determined size; wherein the new page displays the complete error information generated when an error occurs in the target widget.

[0142] In a possible implementation, the creation module is configured to call a preset page start function to create a new page independent of the target widget;

[0143] The page start function creates the new page through a preset second page building tool, and controls the page to jump to the new page through a push function of a navigation tool.

[0144] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.

[0145] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0146] Figure 8 The structure block diagram of an electronic device 800 provided by an exemplary embodiment of the present disclosure is shown. Generally, the device 800 includes: a processor 801 and a memory 802 .

[0147] The processor 801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 801 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 801 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 801 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 801 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0148] The memory 802 may include one or more computer-readable storage media, which may be non-transitory. The memory 802 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 802 is used to store at least one instruction, which is used to be executed by the processor 801 to implement the page display method provided in the method embodiment of the present disclosure.

[0149] In some embodiments, the device 800 may also optionally include: a peripheral device interface 803 and at least one peripheral device. The processor 801, the memory 802 and the peripheral device interface 803 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 803 via a bus, a signal line or a circuit board. Specifically, the peripheral devices include: a display screen 805 and a power supply 808.

[0150] The peripheral device interface 803 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 801 and the memory 802. In some embodiments, the processor 801, the memory 802, and the peripheral device interface 803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 801, the memory 802, and the peripheral device interface 803 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.

[0151] The display screen 804 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 804 is a touch display screen, the display screen 804 also has the ability to collect touch signals on the surface or above the surface of the display screen 804. The touch signal can be input to the processor 801 as a control signal for processing. At this time, the display screen 804 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 804 can be one, and the front panel of the device 800 is set; the display screen 804 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light-emitting diode).

[0152] The power supply 805 is used to power the various components in the device 800. The power supply 805 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 805 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged through a wired line, and a wireless rechargeable battery is a battery that is charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0153] Those skilled in the art will understand that Figure 8 The structure shown in the figure does not constitute a limitation on the device 800, and the device 800 may include more or less components than those shown in the figure, or combine some components, or adopt a different arrangement of components.

[0154] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory including instructions, and the instructions can be executed by a processor of the electronic device 800 to complete the above-mentioned page display method. Optionally, the storage medium can be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0155] In an exemplary embodiment, a computer program product is also provided. When the instructions in the computer program product are executed by the processor of the electronic device 800, the electronic device 800 can execute the page display method in the above method embodiment.

[0156] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0157] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A page display method, characterized in that: Applied in the Flutter framework, the method includes: Detecting that an error occurs in a target widget included in a user interface, and obtaining error information of the target widget, wherein a Flutter application corresponding to the user interface is used to start the user interface at runtime; the user interface is composed of multiple widgets; Create a new page independent of the target widget; Acquire the display screen size of the electronic device; determine the size of the new page according to the data volume of the error information and the display screen size; in response to the received floating display instruction, display the new page in a designated area on the display screen of the electronic device in a top-level display mode according to the determined size; display the complete error information and error summary generated when an error occurs in the target widget through the floating new page; Among them, placing on the top layer means that the new page is displayed at the forefront of all layers and is not blocked by any layer; the error information of the target widget includes: the call stack information when the target widget has an error; the method also includes: Calling a preset first page building tool to obtain custom page content input by a user; wherein the custom page content is used to indicate that an error has occurred in the target widget; and displaying the custom page content through the new page displayed in a suspended manner in a display form that covers the call stack information.

2. The page display method according to claim 1, characterized in that: The method further comprises: In response to the received full-screen display instruction, the new page is displayed in full screen; and the error information is displayed through the new page displayed in full screen.

3. The page display method according to claim 1, characterized in that: The method further comprises: In the Flutter application, an exception detection module is set; the exception detection module is set in a code module corresponding to the entry function of the Flutter application; During the running of the Flutter application, the target widget is detected and determined by the abnormality detection module.

4. The page display method according to claim 3, characterized in that: The obtaining error information of the target widget includes: The error information of the target widget is obtained through the exception capture function included in the exception detection module.

5. The page display method according to claim 1, characterized in that: The creating a new page independent of the target widget includes: Calling a preset page start function to create a new page independent of the target widget; The page start function creates the new page through a preset second page building tool, and controls the page to jump to the new page through a push function of a navigation tool.

6. A page display device, characterized in that: Applied in the Flutter framework, the device includes: A first acquisition unit is configured to detect that an error occurs in a target widget included in a user interface, and acquire error information of the target widget, wherein a Flutter application corresponding to the user interface is used to start the user interface at runtime; the user interface is composed of multiple widgets; A creation unit, configured to create a new page independent of the target widget; A display unit is configured to obtain a display screen size of an electronic device; determine a size of the new page according to the amount of data of the error information and the display screen size; in response to the received floating display instruction, display the new page in a designated area on the display screen of the electronic device in a top-level display mode according to the determined size; and display the complete error information and error summary generated when an error occurs in the target widget on the new page displayed in the floating manner; Among them, placing on the top layer means that the new page is displayed at the forefront of all layers and is not blocked by any layer; the error information of the target widget includes: the call stack information when the target widget has an error; the device also includes: A second acquisition unit is configured to call a preset first page building tool to acquire custom page content input by a user; wherein the custom page content is used to indicate that an error occurs in the target widget; The display unit is further configured to display the custom page content through the new page displayed in a suspended manner in a display form that covers the call stack information.

7. The page display device according to claim 6, characterized in that: The display unit is further configured to display the new page in full screen in response to the received full screen display instruction; and display the error information through the new page displayed in full screen.

8. The page display device according to claim 7, characterized in that: The device also includes: The detection unit is configured to set an exception detection module in the Flutter application; the exception detection module is set in a code module corresponding to an entry function of the Flutter application; and during the running of the Flutter application, the target widget is detected and determined by the exception detection module.

9. The page display device according to claim 8, characterized in that: The first acquisition unit is configured to acquire error information of the target widget through an exception capture function included in the exception detection module.

10. The page display device according to claim 6, characterized in that: The creation module is configured to call a preset page start function to create a new page independent of the target widget; The page start function creates the new page through a preset second page building tool, and controls the page to jump to the new page through a push function of a navigation tool.

11. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the page display method as described in any one of claims 1 to 5.

12. A storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the page display method as described in any one of claims 1 to 5.