Assistant: 
User: system prompt: 
You are a highly intelligent AI assistant that specializes in generating UI components for Flet in Python based on simple user prompts. Your task is to understand the user's intent, generate accurate Flet UI components, and provide explanations if necessary. Here's how you should proceed:

Understand the User's Intent:
Carefully read the user's prompt to identify the type of UI component they need (e.g., buttons, sliders, containers, or custom layouts). Always clarify if the user’s request seems vague.
Flet Context:
Use the Flet framework to generate Python code for the UI components.
Ensure that the components are functional and compatible with the latest version of Flet.
If any specific libraries, tools, or design conventions are required, incorporate them into the generated code.
Web Context and References:
If the user's prompt refers to a library, functionality, or trend that you're unfamiliar with, retrieve relevant context from the web.
Use context-aware design principles, ensuring the components align with UI/UX best practices.
In cases of specific design requests, verify if additional libraries (like CSS styling or advanced widgets) are needed.
Code Generation:
Generate Python code that accurately represents the UI component requested.
Ensure the code is well-structured, with appropriate imports and correct function/method use.
If multiple components are requested, ensure they are compatible and can function together within the same Flet application.
Provide comments in the code to explain key sections and how they relate to the user's prompt.
Handle Errors and Edge Cases:
If the user’s request has potential edge cases (e.g., missing parameters, invalid syntax), offer solutions or suggestions for improvement.
Gracefully handle scenarios where input is incomplete, offering guidance on how to refine it.
Output:
Present the Python code in a well-formatted manner, and explain its functionality briefly if needed.
If possible, include a sample preview of the UI layout in text form, describing how the components will look.

 user prompt: create a flet ui component in python that is a carousel with boxes with text written in it that i can scroll horizontally
 web context: GitHub - naderidev/flet-carousel: simple carousel sliders for flet frameworkSkip to contentNavigation MenuToggle navigationSign inProductGitHub CopilotWrite better code with AISecurityFind and fix vulnerabilitiesActionsAutomate any workflowCodespacesInstant dev environmentsIssuesPlan and track workCode ReviewManage code changesDiscussionsCollaborate outside of codeCode SearchFind more, search lessExploreAll featuresDocumentationGitHub SkillsBlogSolutionsBy sizeEnterpriseTeamsStartupsBy industryHealthcareFinancial servicesManufacturingBy use caseCI/CD & AutomationDevOpsDevSecOpsResourcesTopicsAIDevOpsSecuritySoftware DevelopmentView allExploreLearning PathwaysWhite papers, Ebooks, WebinarsCustomer StoriesPartnersOpen SourceGitHub SponsorsFund open source developersThe ReadME ProjectGitHub community articlesRepositoriesTopicsTrendingCollectionsEnterpriseEnterprise platformAI-powered developer platformAvailable add-onsAdvanced SecurityEnterprise-grade security featuresGitHub CopilotEnterprise-grade AI featuresPremium SupportEnterprise-grade 24/7 supportPricingSearch or jump to...Search code, repositories, users, issues, pull requests...SearchClearSearch syntax tipsProvide feedbackWe read every piece of feedback, and take your input very seriously.Include my email address so I can be contactedCancelSubmit feedbackSaved searchesUse saved searches to filter your results more quicklyNameQueryTo see all available qualifiers, see ourdocumentation.CancelCreate saved searchSign inSign upReseting focusYou signed in with another tab or window.Reloadto refresh your session.You signed out in another tab or window.Reloadto refresh your session.You switched accounts on another tab or window.Reloadto refresh your session.Dismiss alertnaderidev/flet-carouselPublicNotificationsYou must be signed in to change notification settingsFork4Star22simple carousel sliders for flet frameworkLicenseMIT license22stars4forksBranchesTagsActivityStarNotificationsYou must be signed in to change notification settingsCodeIssues2Pull requests0ActionsProjects0SecurityInsightsAdditional navigation optionsCodeIssuesPull requestsActionsProjectsSecurityInsightsnaderidev/flet-carouselThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.masterBranchesTagsGo to fileCodeFolders and filesNameNameLast commit messageLast commit dateLatest commitHistory51 Commitsexamplesexamplessrc/fletcarouselsrc/fletcarouselLICENSELICENSEREADME.mdREADME.mdpyproject.tomlpyproject.tomlscreenshot1.pngscreenshot1.pngscreenshot2.pngscreenshot2.pngsetup.pysetup.pyView all filesRepository files navigationREADMEMIT licenseFlet simple carousel slidersThis project is a carousel sliders pack with different types for the Flet framework. This project is under development, so in
the future, different types of sliders will be added to the project.Installationpip install fletcarouselorgit clone https://github.com/naderidev/flet-carouselHow to useThere are some types of sliders, so in the following, we will explain each type of them.BasicHorizontalCarouselThis type of slider is the basic one. This type is horizontal and there are two buttons to control slides.for example:BasicHorizontalCarousel(page=page,items_count=3,# auto_cycle=AutoCycle(duration=1),items=[Container(content=Text(value=str(i),size=20),height=200,width=300,bgcolor='red',border_radius=15,alignment=alignment.center,
        )foriinrange(10)
    ],buttons=[FloatingActionButton(icon=icons.NAVIGATE_BEFORE,bgcolor='#1f2127'),FloatingActionButton(icon=icons.NAVIGATE_NEXT,bgcolor='#1f2127')
    ],vertical_alignment=CrossAxisAlignment.CENTER,items_alignment=MainAxisAlignment.CENTER)Propertiespagethe main pageContainer propertieswidth: slider widthheight:slider heightexpand: filling available spacetooltip: tooltipdisabled: disabledpadding: paddingmargin: marginalignment: alignmentbgcolor: background colorgradient: gradientborder: borderborder_radius: border_radiusSlider propertiesitems: the items that you want to be in slide showitems_count: the count of controls in each slidevertical_alignment: items vertical_alignmentitems_alignment: items alignmentspacing: spacing between itemsauto_cycle: auto cycleing (Auto changing slides)buttons: the list of Slider's buttons that must be two buttons! the first one is the "previous" button and the second is the "next" buttonMethodsnext: next slideprev:  previous slideupdate_items:  updating itemsreset_items_index:  reseting items indexcheck out the fileexamples/flet_carousel_basic.pyBasicAnimatedHorizontalCarouselThis type of slider works with AnimatedSwitcher and unlike "BasicHorizontalCarousel" has no next and prev button but has hint lines.for example:BasicAnimatedHorizontalCarousel(page=page,auto_cycle=AutoCycle(duration=2),expand=True,padding=50,hint_lines=HintLine(active_color='red',inactive_color='white',alignment=MainAxisAlignment.CENTER,max_list_size=400),items=[Container(content=Text(value=str(i),size=30),height=400,expand=True,bgcolor='red',border_radius=15,alignment=alignment.center,
        )foriinrange(10)
    ],
)Propertiespagethe main pageContainer propertieswidth: slider widthheight:slider heightexpand: filling available spacetooltip: tooltipdisabled: disabledpadding: paddingmargin: marginalignment: alignmentbgcolor: background colorgradient: gradientborder: borderborder_radius: border_radiusSlider propertiesitems: the items that you want to be in sliderhint_lines: hint lines settingsanimated_switcher: The AnimatedSwitcher settingsauto_cycle: auto cycleing (Auto changing slides)Methodsnext: next slideprev:  previous slideupdate_items:  updating itemsgo:  go to a specific slidecheck out the fileexamples/animated_horizontal_basic.pyHope to enjoy :)Donatingbuy me a coffeeAboutsimple carousel sliders for flet frameworkTopicspythonslidercarouselcarousel-sliderslidershowfletResourcesReadmeLicenseMIT licenseActivityStars22starsWatchers1watchingForks4forksReport repositoryReleasesNo releases publishedPackages0No packages publishedContributors3LanguagesPython100.0%Footer© 2024 GitHub, Inc.Footer navigationTermsPrivacySecurityStatusDocsContactManage cookiesDo not share my personal informationYou can’t perform that action at this time.
Assistant: