├── .gitignore
├── .metadata
├── FlutterApp.png
├── LICENSE
├── README.md
├── _config.yml
├── analysis_options.yaml
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ ├── key
│ │ └── sign.jks
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── io
│ │ │ │ └── flutter
│ │ │ │ └── plugins
│ │ │ │ └── GeneratedPluginRegistrant.java
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── flutter_app
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable
│ │ │ ├── launch_background.xml
│ │ │ └── splash.png
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── values
│ │ │ └── styles.xml
│ │ │ └── xml
│ │ │ └── network_security_config.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── logo.png
├── settings.gradle
└── settings_aar.gradle
├── assets
├── data
│ ├── chinese_cities.json
│ ├── country.json
│ ├── data.json
│ ├── elements.json
│ ├── friends.json
│ ├── songlist_category.json
│ └── top_category.json
└── fonts
│ ├── Aleo-Bold.ttf
│ ├── Aleo-Italic.ttf
│ ├── Aleo-Light.ttf
│ ├── Aleo-Regular.ttf
│ └── custom
│ └── iconfont.ttf
├── custom_font
├── demo.css
├── demo_index.html
└── iconfont.css
├── flutter_libs
├── .gitignore
├── .metadata
├── CHANGELOG.md
├── LICENSE
├── README.md
├── analysis_options.yaml
├── lib
│ ├── animated_icon_button.dart
│ ├── animated_number_view.dart
│ ├── avatar_glow.dart
│ ├── bottom_bar_view.dart
│ ├── bottom_drag_widget.dart
│ ├── bubble_bottom_bar.dart
│ ├── circle_color_picker.dart
│ ├── circle_progress.dart
│ ├── curved_navigation_bar.dart
│ ├── dash_path.dart
│ ├── dialog
│ │ ├── asset_giffy_dialog.dart
│ │ └── network_giffy_dialog.dart
│ ├── drag_sort_view.dart
│ ├── dropdown_menu
│ │ ├── dropdown_header.dart
│ │ ├── dropdown_menu.dart
│ │ └── dropdown_menu_controller.dart
│ ├── flip_card.dart
│ ├── flutter_flip_view.dart
│ ├── flutter_libs.dart
│ ├── fluttery
│ │ ├── framing.dart
│ │ ├── seekbars.dart
│ │ └── src
│ │ │ ├── animation_player.dart
│ │ │ ├── layout_code.dart
│ │ │ ├── layout_overlays.dart
│ │ │ └── radial_drag_gesture_detector.dart
│ ├── gradient_text.dart
│ ├── horizontal_number_picker.dart
│ ├── horizontal_picker.dart
│ ├── indicator
│ │ ├── dots_indicator.dart
│ │ ├── rect_indicator.dart
│ │ └── scroll_indicator.dart
│ ├── like_button.dart
│ ├── line_bar_visualizer.dart
│ ├── marquee.dart
│ ├── nine_grid_view.dart
│ ├── progress_button.dart
│ ├── radar.dart
│ ├── ruler.dart
│ ├── skip_down_time_progress.dart
│ ├── slide_button.dart
│ ├── slide_menu_item.dart
│ ├── sliding_up_panel.dart
│ ├── smooth_star_rating.dart
│ ├── stick_widget.dart
│ ├── titled_navigation_bar.dart
│ └── utils.dart
└── pubspec.yaml
├── images
├── 2.0x
│ ├── femal.png
│ ├── icon_nav_logo.png
│ └── write.png
├── 3.0x
│ ├── femal.png
│ ├── icon_nav_logo.png
│ └── write.png
├── add_image.png
├── bg_blue.png
├── empty.jpeg
├── femal.png
├── flare
│ └── Teddy.flr
├── flutter_logo.png
├── flutterlogo.png
├── ic_index_bar_bubble_gray.png
├── icon_crash_logo.png
├── icon_guiji.png
├── icon_nav_logo.png
├── icon_rili.png
├── icon_train.png
├── kexin_icon.png
├── kexin_text.png
├── left.png
├── loading.png
├── logo.png
├── middle.jpg
├── onboarding0.png
├── onboarding1.png
├── onboarding2.png
├── planeroute_white.png
├── player_needle.png
├── point.png
├── qdaily
│ ├── all_column_unsub.png
│ ├── bg_whatsnew_bg_1.jpg
│ ├── bg_whatsnew_bg_2.jpg
│ ├── bg_whatsnew_bg_3.jpg
│ ├── ic_launcher.png
│ ├── icon_lab_vot_join.png
│ ├── icon_lab_vot_new.png
│ ├── icon_menu_about_day.png
│ ├── icon_menu_category_day.png
│ ├── icon_menu_column_day.png
│ ├── icon_menu_feedback_day.png
│ ├── icon_menu_notification_day.png
│ ├── icon_menu_usercenter_day.png
│ ├── icon_toolbar_comment.png
│ ├── icon_toolbar_like_unpressed.png
│ ├── qdaily_logo.jpeg
│ └── yellowDot.png
├── reader
│ ├── icon_me_vip.png
│ ├── icon_tab_bookshelf_n.png
│ ├── icon_tab_bookshelf_p.png
│ ├── icon_tab_home_n.png
│ ├── icon_tab_home_p.png
│ ├── icon_tab_me_n.png
│ └── icon_tab_me_p.png
├── right.jpg
├── right.png
├── rumor_icon.png
├── rumor_text.png
├── shangwudinglun_icon.png
├── shangwudinglun_text.png
├── splash.jpg
├── tag_icons
│ ├── tab_1.png
│ ├── tab_1s.png
│ ├── tab_2.png
│ ├── tab_2s.png
│ ├── tab_3.png
│ ├── tab_3s.png
│ ├── tab_4.png
│ └── tab_4s.png
├── timg.gif
├── update_head.jpg
├── weather_backgrounds
│ ├── back_100d.jpg
│ ├── back_100n.jpg
│ ├── back_101d.jpg
│ ├── back_101n.jpg
│ ├── back_104d.jpg
│ ├── back_104n.jpg
│ ├── back_300d.jpg
│ ├── back_300n.jpg
│ ├── back_302d.jpg
│ ├── back_302n.jpg
│ ├── back_400d.jpg
│ ├── back_400n.jpg
│ ├── back_500d.jpg
│ ├── back_500n.jpg
│ ├── back_502d.jpg
│ ├── back_502n.jpg
│ ├── back_503d.jpg
│ ├── back_503n.jpg
│ ├── back_900d.jpg
│ ├── back_901d.jpg
│ └── back_901n.jpg
├── write.png
├── xianyu.png
├── yiqing_yidian_one.png
└── yiqing_yidian_two.png
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Podfile
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
└── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-1024x1024@1x.png
│ │ ├── Icon-App-20x20@1x.png
│ │ ├── Icon-App-20x20@2x.png
│ │ ├── Icon-App-20x20@3x.png
│ │ ├── Icon-App-29x29@1x.png
│ │ ├── Icon-App-29x29@2x.png
│ │ ├── Icon-App-29x29@3x.png
│ │ ├── Icon-App-40x40@1x.png
│ │ ├── Icon-App-40x40@2x.png
│ │ ├── Icon-App-40x40@3x.png
│ │ ├── Icon-App-50x50@1x.png
│ │ ├── Icon-App-50x50@2x.png
│ │ ├── Icon-App-57x57@1x.png
│ │ ├── Icon-App-57x57@2x.png
│ │ ├── Icon-App-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.png
│ │ ├── Icon-App-72x72@1x.png
│ │ ├── Icon-App-72x72@2x.png
│ │ ├── Icon-App-76x76@1x.png
│ │ ├── Icon-App-76x76@2x.png
│ │ └── Icon-App-83.5x83.5@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── GeneratedPluginRegistrant.h
│ ├── GeneratedPluginRegistrant.m
│ ├── Info.plist
│ └── Runner-Bridging-Header.h
├── lib
├── animation
│ ├── animated_align.dart
│ ├── animated_builder.dart
│ ├── animated_container.dart
│ ├── animated_cross_fade.dart
│ ├── animated_icons.dart
│ ├── animated_number.dart
│ ├── animated_opacity.dart
│ ├── animated_padding.dart
│ ├── animated_physical_model.dart
│ ├── animated_positioned.dart
│ ├── animated_size.dart
│ ├── animated_switcher.dart
│ ├── animated_wear.dart
│ ├── curves_demo.dart
│ ├── custom_animation.dart
│ ├── relative_positioned_transition.dart
│ ├── tween.dart
│ ├── tween_animation_builder.dart
│ └── utils
│ │ └── animations.dart
├── article
│ ├── collect_article.dart
│ ├── db
│ │ └── article_provider.dart
│ ├── index.dart
│ ├── one_article_page.dart
│ └── store
│ │ └── article_model.dart
├── baixing_life
│ ├── baixing_page.dart
│ ├── db
│ │ ├── address_provider.dart
│ │ └── goods_provider.dart
│ ├── index.dart
│ ├── on_boarding_page.dart
│ ├── page
│ │ ├── about.dart
│ │ ├── address
│ │ │ ├── address_page.dart
│ │ │ ├── create_edit_address_page.dart
│ │ │ ├── item_address.dart
│ │ │ ├── menu_reveal.dart
│ │ │ └── store
│ │ │ │ └── address_model.dart
│ │ ├── classify.dart
│ │ ├── details_page.dart
│ │ ├── home.dart
│ │ ├── member.dart
│ │ ├── order_home_page.dart
│ │ ├── order_view.dart
│ │ ├── shop_info.dart
│ │ ├── shopping_cart.dart
│ │ └── shops.dart
│ └── ui
│ │ ├── cart_amount_view.dart
│ │ ├── empty_shop_cart.dart
│ │ ├── item_cart_goods.dart
│ │ ├── item_floor_goods.dart
│ │ ├── item_goods_grid.dart
│ │ ├── item_home_floor.dart
│ │ ├── item_order.dart
│ │ ├── item_order_goods.dart
│ │ ├── left_menu.dart
│ │ └── right_listview.dart
├── bars_demo
│ ├── bottom_appbar.dart
│ ├── bottom_barview.dart
│ ├── bottom_navigation_bar.dart
│ ├── bubble_bottom_bar.dart
│ ├── cupertino_tabbar.dart
│ ├── curved_navigation_bar_sample.dart
│ ├── each_view.dart
│ ├── fancy_bottom_navigation.dart
│ ├── keep_alive.dart
│ ├── navigationbar_fixed.dart
│ ├── navigationbar_shifting.dart
│ ├── tabbar_demo.dart
│ ├── tabbar_home_page.dart
│ └── titled_navigation_bar.dart
├── base
│ ├── base_list_model.dart
│ ├── base_model.dart
│ ├── base_object_model.dart
│ ├── provider_stless_widget.dart
│ ├── provider_widget.dart
│ ├── test_list_model.dart
│ ├── test_list_page.dart
│ ├── test_page.dart
│ └── text_model.dart
├── bean
│ ├── address.dart
│ ├── article.dart
│ ├── baixing.dart
│ ├── base_result.dart
│ ├── books.dart
│ ├── city.dart
│ ├── condition.dart
│ ├── contact.dart
│ ├── country.dart
│ ├── doodle.dart
│ ├── element.dart
│ ├── friends_dynamic.dart
│ ├── he_weather.dart
│ ├── hitokoto.dart
│ ├── image.dart
│ ├── index.dart
│ ├── juzimi.dart
│ ├── movie.dart
│ ├── music.dart
│ ├── news.dart
│ ├── qdaily.dart
│ ├── result.dart
│ ├── sars_cov.dart
│ ├── sports.dart
│ ├── tiktok_video.dart
│ ├── tubitv.dart
│ ├── user.dart
│ └── youdao.dart
├── contact
│ ├── index.dart
│ ├── page
│ │ ├── contact_list_page.dart
│ │ └── contact_page.dart
│ └── ui
│ │ ├── build_address.dart
│ │ ├── build_email.dart
│ │ ├── build_other.dart
│ │ ├── build_phone.dart
│ │ ├── build_row.dart
│ │ ├── contact_category.dart
│ │ ├── contact_item.dart
│ │ └── contact_list_header.dart
├── delegates
│ ├── custom_sliver_appbar_delegate.dart
│ ├── custom_sliver_header_delegate.dart
│ ├── fallback_cupertino_localisations_delegate.dart
│ ├── search_bar_delegate.dart
│ ├── search_city_delegate.dart
│ └── sliver_appbar_delegate.dart
├── enum
│ └── enum.dart
├── generated
│ ├── intl
│ │ ├── messages_all.dart
│ │ ├── messages_en.dart
│ │ ├── messages_zh.dart
│ │ ├── messages_zh_HK.dart
│ │ └── messages_zh_TW.dart
│ └── l10n.dart
├── global
│ ├── config.dart
│ ├── custom_icon.dart
│ └── data.dart
├── home_page.dart
├── intro_slide_page.dart
├── juzimi
│ ├── details.dart
│ ├── home.dart
│ ├── item_list.dart
│ ├── list.dart
│ ├── shimmer_view.dart
│ ├── splash.dart
│ └── tag_list.dart
├── l10n
│ ├── intl_en.arb
│ ├── intl_zh.arb
│ ├── intl_zh_HK.arb
│ └── intl_zh_TW.arb
├── login
│ ├── page
│ │ ├── forgot_password_page.dart
│ │ ├── login_page.dart
│ │ ├── sign_in_page.dart
│ │ └── sign_up_page.dart
│ └── ui
│ │ ├── identity_code_view.dart
│ │ └── submit_button.dart
├── main.dart
├── movie
│ ├── index.dart
│ ├── page
│ │ ├── movie_celebrity.dart
│ │ ├── movie_classify_page.dart
│ │ ├── movie_comment.dart
│ │ ├── movie_detail.dart
│ │ ├── movie_filter_page.dart
│ │ ├── movie_home_page.dart
│ │ ├── movie_hot.dart
│ │ ├── movie_photos.dart
│ │ ├── movie_range.dart
│ │ ├── movie_range_detail.dart
│ │ ├── movie_ranking_home.dart
│ │ ├── movie_ranking_sub_page.dart
│ │ ├── movie_soon.dart
│ │ ├── movie_tag_list.dart
│ │ ├── movie_top250.dart
│ │ ├── movie_video.dart
│ │ └── movie_with_celebrity.dart
│ └── ui
│ │ ├── banner_view.dart
│ │ ├── classify_section_home.dart
│ │ ├── classify_section_view.dart
│ │ ├── cover_section_view.dart
│ │ ├── expandable_text.dart
│ │ ├── filter_listview.dart
│ │ ├── filter_view.dart
│ │ ├── first_movie_view.dart
│ │ ├── item_classify_tag.dart
│ │ ├── item_comment.dart
│ │ ├── item_cover.dart
│ │ ├── item_grid_view.dart
│ │ ├── item_list.dart
│ │ ├── item_photo.dart
│ │ ├── item_range.dart
│ │ ├── item_ranking_movie.dart
│ │ ├── item_soon_view.dart
│ │ ├── movie_celebrity_header.dart
│ │ ├── movie_desc.dart
│ │ ├── movie_detail_header.dart
│ │ ├── movie_grid_view.dart
│ │ ├── person_gridview.dart
│ │ ├── person_scroller.dart
│ │ ├── ranking_banner.dart
│ │ └── star_rate.dart
├── music_player
│ ├── audioplayers.dart
│ ├── flutter_sound.dart
│ ├── index.dart
│ ├── music_player.dart
│ ├── song_list
│ │ ├── category.dart
│ │ └── details.dart
│ ├── top
│ │ ├── list.dart
│ │ └── songs.dart
│ └── widgets
│ │ ├── album_cover.dart
│ │ ├── cd_view.dart
│ │ ├── item_rank_grid.dart
│ │ ├── item_rank_list.dart
│ │ ├── item_songlist_category.dart
│ │ ├── item_songlist_info.dart
│ │ ├── item_top_song.dart
│ │ ├── radial_seek_bar.dart
│ │ └── song_player_bar.dart
├── mvp
│ ├── data
│ │ ├── crypto.dart
│ │ └── crypto_repository_impl.dart
│ ├── home_page.dart
│ └── modules
│ │ └── crypto_list_presenter.dart
├── my_app.dart
├── nba
│ ├── home
│ │ ├── home.dart
│ │ ├── player_rank.dart
│ │ ├── rank.dart
│ │ ├── schedule.dart
│ │ └── team_data_rank
│ │ │ ├── home.dart
│ │ │ └── list.dart
│ ├── index.dart
│ ├── match
│ │ ├── home.dart
│ │ └── widgets
│ │ │ ├── item_match_head.dart
│ │ │ ├── item_match_player_maxdata.dart
│ │ │ ├── item_match_player_stats.dart
│ │ │ ├── item_match_player_stats_left.dart
│ │ │ ├── item_match_team_stats.dart
│ │ │ ├── item_period_goals.dart
│ │ │ ├── match_player_stats.dart
│ │ │ └── match_player_stats_title.dart
│ ├── news.dart
│ ├── player
│ │ ├── career.dart
│ │ ├── data.dart
│ │ ├── home.dart
│ │ ├── info.dart
│ │ └── match.dart
│ ├── team
│ │ ├── data.dart
│ │ ├── home.dart
│ │ ├── info.dart
│ │ ├── roster.dart
│ │ └── schedule.dart
│ └── widgets
│ │ ├── card_player_rank.dart
│ │ ├── item_bar_chart.dart
│ │ ├── item_cell.dart
│ │ ├── item_player_match.dart
│ │ ├── item_player_news.dart
│ │ ├── item_player_rank_card.dart
│ │ ├── item_rank.dart
│ │ ├── item_roster.dart
│ │ ├── item_schedule.dart
│ │ ├── item_team_data_rank.dart
│ │ ├── player_career_body.dart
│ │ ├── player_career_title.dart
│ │ └── player_match_title.dart
├── page
│ ├── backdrop.dart
│ ├── bottom_drag.dart
│ ├── card_flip_page.dart
│ ├── clippy_widget.dart
│ ├── device_info_page.dart
│ ├── drag_sort_page.dart
│ ├── dropdown_menu_sample.dart
│ ├── elements.dart
│ ├── flip_view_custom.dart
│ ├── flipper_widget.dart
│ ├── flutter_flip_view_sample.dart
│ ├── horizontal_picker_demo.dart
│ ├── inner_drawer.dart
│ ├── like_button_page.dart
│ ├── loading_json.dart
│ ├── login
│ │ ├── login_page.dart
│ │ ├── quickly_login_page.dart
│ │ ├── register_page.dart
│ │ └── reset_password_page.dart
│ ├── login4
│ │ ├── background.dart
│ │ ├── login.dart
│ │ └── signup.dart
│ ├── login6
│ │ ├── component
│ │ │ ├── iconbutton.dart
│ │ │ ├── on_boarding_enter_animation.dart
│ │ │ ├── trapezoid_down_cut.dart
│ │ │ └── trapezoid_up_cut.dart
│ │ ├── index.dart
│ │ └── tabs
│ │ │ ├── signin.dart
│ │ │ └── signup.dart
│ ├── login_video_page.dart
│ ├── mine_page.dart
│ ├── nine_grid_page.dart
│ ├── pages.dart
│ ├── palette_generator_sample.dart
│ ├── parallax_image.dart
│ ├── random_words.dart
│ ├── route_sample.dart
│ ├── ruler_sample.dart
│ ├── second_floor.dart
│ ├── setting.dart
│ ├── shimmer.dart
│ ├── slide_menu_item_demo.dart
│ ├── sound_demo.dart
│ ├── swiper_sample.dart
│ ├── table_sample.dart
│ ├── theme_sample.dart
│ ├── time_line.dart
│ └── wave_sample.dart
├── page_index.dart
├── qdaily
│ ├── article_detail.dart
│ ├── book_detail.dart
│ ├── column
│ │ ├── columns.dart
│ │ └── special.dart
│ ├── comment.dart
│ ├── home.dart
│ ├── index.dart
│ ├── lab
│ │ ├── lab_i_say.dart
│ │ ├── lab_ratio.dart
│ │ ├── lab_topics.dart
│ │ ├── lab_vote.dart
│ │ ├── lab_who.dart
│ │ ├── lab_you_guess.dart
│ │ └── labs.dart
│ ├── qdaily_index.dart
│ ├── search.dart
│ ├── setting.dart
│ ├── splash.dart
│ ├── tags.dart
│ └── ui
│ │ ├── banner_view.dart
│ │ ├── bottom_appbar.dart
│ │ ├── choice_no_view.dart
│ │ ├── column_author_view.dart
│ │ ├── item_bottom_view.dart
│ │ ├── item_column.dart
│ │ ├── item_column_type.dart
│ │ ├── item_comment.dart
│ │ ├── item_feed_type_book.dart
│ │ ├── item_feed_type_index.dart
│ │ ├── item_feed_type_one.dart
│ │ ├── item_feed_type_recommend.dart
│ │ ├── item_feed_type_two.dart
│ │ ├── item_feed_type_zero.dart
│ │ ├── item_lab_topics.dart
│ │ ├── item_option_checkbox.dart
│ │ ├── item_option_image.dart
│ │ ├── item_option_text.dart
│ │ ├── item_top_view.dart
│ │ ├── item_vote_options.dart
│ │ ├── lab_choice_itemview.dart
│ │ ├── lab_info_header.dart
│ │ ├── lab_ratio_firstview.dart
│ │ ├── lab_ratio_pageview.dart
│ │ ├── lab_who_itemview.dart
│ │ ├── view_option_author.dart
│ │ ├── view_option_bottom.dart
│ │ └── vote_arc_view.dart
├── question
│ ├── bean
│ │ ├── question.dart
│ │ └── quiz.dart
│ ├── pages
│ │ ├── quiz_page.dart
│ │ └── score_page.dart
│ └── ui
│ │ ├── answer_button.dart
│ │ ├── correct_wrong_overlay.dart
│ │ └── question_test.dart
├── reader
│ ├── booklist
│ │ ├── booklist.dart
│ │ ├── booklist_info.dart
│ │ └── booklists.dart
│ ├── bookshelf
│ │ └── bookshelf.dart
│ ├── bookstore
│ │ ├── bookstore.dart
│ │ ├── picture.dart
│ │ ├── picture_books.dart
│ │ ├── recommend.dart
│ │ └── storebooks.dart
│ ├── db
│ │ └── bookshelf_db_helper.dart
│ ├── details
│ │ ├── book_reader.dart
│ │ ├── chapters.dart
│ │ ├── details.dart
│ │ ├── reader.dart
│ │ └── reader_page_agent.dart
│ ├── home.dart
│ ├── index.dart
│ ├── interest
│ │ ├── choice_tag.dart
│ │ └── gender.dart
│ ├── login
│ │ └── login.dart
│ ├── myself
│ │ └── myself.dart
│ ├── ranking
│ │ ├── ranking.dart
│ │ ├── ranking_book_list.dart
│ │ └── rankings.dart
│ ├── search
│ │ ├── search.dart
│ │ └── search_result.dart
│ ├── store
│ │ ├── book_model.dart
│ │ └── setting_model.dart
│ └── widgets
│ │ ├── book_detail_header.dart
│ │ ├── change_textsize_view.dart
│ │ ├── change_textspace_view.dart
│ │ ├── details_appbar_view.dart
│ │ ├── details_bottom_view.dart
│ │ ├── details_doc_view.dart
│ │ ├── details_interested_view.dart
│ │ ├── details_review_view.dart
│ │ ├── item_book.dart
│ │ ├── item_booklist.dart
│ │ ├── item_booklist_book.dart
│ │ ├── item_bookshelf.dart
│ │ ├── item_chapter.dart
│ │ ├── item_doc.dart
│ │ ├── item_picture_book.dart
│ │ ├── item_ranking_book.dart
│ │ └── item_review.dart
├── res
│ ├── colors.dart
│ ├── dimens.dart
│ └── styles.dart
├── sars_cov
│ ├── index.dart
│ ├── page
│ │ ├── analyze.dart
│ │ ├── area
│ │ │ ├── area.dart
│ │ │ └── ui
│ │ │ │ ├── area_data_view.dart
│ │ │ │ ├── item_area_news.dart
│ │ │ │ └── item_data.dart
│ │ ├── same_ride.dart
│ │ └── trajectory
│ │ │ ├── trajectory.dart
│ │ │ └── ui
│ │ │ ├── area_choice_view.dart
│ │ │ └── item_trajectory.dart
│ ├── ui
│ │ ├── item_city_view.dart
│ │ ├── item_continent_view.dart
│ │ ├── item_country_view.dart
│ │ ├── item_lore.dart
│ │ ├── item_province_view.dart
│ │ └── item_rumor.dart
│ └── widget
│ │ ├── card_widget.dart
│ │ ├── china_count_cardview.dart
│ │ ├── count_view.dart
│ │ ├── distributing.dart
│ │ ├── foreign_count_cardview.dart
│ │ ├── home_head_view.dart
│ │ ├── lore.dart
│ │ ├── map.dart
│ │ ├── note_remark.dart
│ │ ├── protect.dart
│ │ ├── rumor.dart
│ │ └── title_container.dart
├── service
│ ├── api_url.dart
│ ├── book_repository.dart
│ ├── index.dart
│ ├── movie_repository.dart
│ ├── music_repository.dart
│ ├── nba_repository.dart
│ ├── other_repository.dart
│ ├── qdaily_repository.dart
│ ├── sarscov_repository.dart
│ ├── shopping_repository.dart
│ ├── user_repository.dart
│ └── weather_repository.dart
├── splash_screen.dart
├── store
│ ├── index.dart
│ ├── models
│ │ ├── baixing_model.dart
│ │ ├── config_model.dart
│ │ ├── music_model.dart
│ │ ├── shopping_cart_model.dart
│ │ ├── songlist_model.dart
│ │ ├── user_model.dart
│ │ └── weather_model.dart
│ └── provider_store.dart
├── stream_packing
│ ├── index.dart
│ ├── loading_dialog.dart
│ ├── multi_state_widget.dart
│ ├── state.dart
│ └── state_manager.dart
├── tiktok
│ ├── home.dart
│ ├── item_video.dart
│ ├── left_menu.dart
│ ├── person.dart
│ └── video.dart
├── tubitv
│ ├── details.dart
│ ├── details_header.dart
│ ├── details_info.dart
│ ├── home.dart
│ ├── item_episode.dart
│ ├── item_home.dart
│ ├── item_movie.dart
│ ├── item_season.dart
│ ├── list.dart
│ ├── list_section_title_view.dart
│ ├── related_view.dart
│ ├── search.dart
│ └── video_player.dart
├── ui
│ ├── appbar.dart
│ ├── bottom_sheet.dart
│ ├── bouncing_view.dart
│ ├── button.dart
│ ├── circle_button.dart
│ ├── code_input_text.dart
│ ├── countdown_widget.dart
│ ├── dark_theme.dart
│ ├── dialog.dart
│ ├── gradual_change_view.dart
│ ├── home_drawable.dart
│ ├── home_drawable_header.dart
│ ├── icon_text.dart
│ ├── image_load_view.dart
│ ├── input_text_view.dart
│ ├── input_view.dart
│ ├── light_theme.dart
│ ├── line.dart
│ ├── line_view_line.dart
│ ├── loader.dart
│ ├── photo_view.dart
│ ├── popup_window.dart
│ ├── section_view.dart
│ ├── select_text_item.dart
│ ├── selected_text.dart
│ ├── shimmer.dart
│ ├── slider_button.dart
│ ├── sliding_card_view.dart
│ ├── state_view
│ │ ├── empty.dart
│ │ ├── error.dart
│ │ └── loading.dart
│ ├── suspension_tag.dart
│ ├── tagview.dart
│ ├── uis.dart
│ ├── update_dialog.dart
│ ├── vercode_timer_text.dart
│ └── web_view.dart
├── ui_screen
│ ├── bank_screen.dart
│ ├── bottom_menu.dart
│ ├── bottom_sheet_login.dart
│ ├── card_scroll_page.dart
│ ├── code_input.dart
│ ├── ctrip.dart
│ ├── drawing_board.dart
│ ├── flare_login.dart
│ ├── foldable.dart
│ ├── guillotine_menu.dart
│ ├── light_drawer.dart
│ ├── logon.dart
│ ├── movies_concept.dart
│ ├── personal_center.dart
│ ├── qrcode.dart
│ ├── recorder_demo.dart
│ ├── sign_in.dart
│ ├── sign_up.dart
│ ├── sliding_login.dart
│ └── ticket
│ │ ├── data.dart
│ │ ├── flight_baarcode.dart
│ │ ├── flight_details.dart
│ │ ├── flight_summary.dart
│ │ ├── folding_ticket.dart
│ │ ├── index.dart
│ │ └── item_ticket.dart
├── utils
│ ├── database.dart
│ ├── date_format.dart
│ ├── file_util.dart
│ ├── generate_utils.dart
│ ├── http_utils.dart
│ ├── log_util.dart
│ ├── num_utils.dart
│ ├── permissions_util.dart
│ ├── route_util.dart
│ ├── sp_util.dart
│ ├── toast.dart
│ └── utils.dart
├── weather
│ ├── page
│ │ ├── city_manager.dart
│ │ ├── city_page.dart
│ │ ├── search_cities.dart
│ │ └── weather_page.dart
│ └── ui
│ │ ├── air_view.dart
│ │ ├── hourly_view.dart
│ │ ├── lifestyle_view.dart
│ │ ├── now_view.dart
│ │ ├── sun_view.dart
│ │ ├── sunrise_sunset_line.dart
│ │ ├── sunrise_sunset_painter.dart
│ │ ├── temp_double_line.dart
│ │ ├── temp_single_line.dart
│ │ └── weekly_view.dart
├── wechat_friends
│ ├── page
│ │ ├── publish_dynamic.dart
│ │ └── wechat_friends_circle.dart
│ └── ui
│ │ ├── asset_view.dart
│ │ └── item_dynamic.dart
├── widget
│ ├── appbar_widget.dart
│ ├── aspect_ratio.dart
│ ├── bottom_sheet.dart
│ ├── button_widget.dart
│ ├── buttonbar.dart
│ ├── check_switch_widget.dart
│ ├── chip_widget.dart
│ ├── color_filtered.dart
│ ├── contact_picker_widget.dart
│ ├── date_time_picker.dart
│ ├── dialog_widget.dart
│ ├── dismissible_widget.dart
│ ├── draggable_grid_page.dart
│ ├── draggable_widget.dart
│ ├── floating_touch.dart
│ ├── flutter_jd_address_selector.dart
│ ├── font_loader.dart
│ ├── frosting_widget.dart
│ ├── grid_paper.dart
│ ├── icon_widget.dart
│ ├── image_widget.dart
│ ├── inherited_widget.dart
│ ├── keyboard_state.dart
│ ├── load_image_widget.dart
│ ├── notification_listener.dart
│ ├── range_slider_demo.dart
│ ├── reorderable_listview.dart
│ ├── rounded_letter_widget.dart
│ ├── scroll_header_demo.dart
│ ├── slider_widget.dart
│ ├── sliver.dart
│ ├── sliver_demo.dart
│ ├── sliver_widget.dart
│ ├── staggered_view_page.dart
│ ├── star_rating_widget.dart
│ ├── stepper_widget.dart
│ ├── text_widget.dart
│ ├── textfield_widget.dart
│ ├── toggle_buttons.dart
│ ├── value_listenable_builder_widget.dart
│ └── widgets.dart
└── youdao
│ ├── index.dart
│ ├── page
│ ├── home.dart
│ └── tag_page.dart
│ └── widget
│ ├── ad_dialog.dart
│ ├── item_column.dart
│ ├── item_course.dart
│ ├── item_tag.dart
│ └── item_tag_recommend_course.dart
├── logo.png
├── pubspec.yaml
└── third_pubs.md
/.gitignore:
--------------------------------------------------------------------------------
1 | local.properties
2 | *.iml
3 | gradlew
4 | .packages
5 | .flutter-plugins
6 | .idea/
7 | *.log
8 | flutter_export_environment.sh
9 | test.dart
10 | .dart_tool
11 | Podfile.lock
12 | .flutter-plugins-dependencies
13 | test
14 | .last_build_id
15 | pubspec.lock
16 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: e70236e36ce1d32067dc68eb55519ec3e14b6b01
8 | channel: beta
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/FlutterApp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/FlutterApp.png
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-merlot
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 |
--------------------------------------------------------------------------------
/android/app/key/sign.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/android/app/key/sign.jks
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/flutter_app/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.flutter_app
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/android/app/src/main/res/drawable/splash.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
18 |
21 |
22 |
--------------------------------------------------------------------------------
/android/app/src/main/res/xml/network_security_config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.7.0'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | maven { url 'https://jitpack.io' }
7 | }
8 |
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:7.1.2'
11 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | google()
18 | mavenCentral()
19 | maven { url 'https://jitpack.io' }
20 | }
21 | }
22 |
23 | rootProject.buildDir = '../build'
24 | subprojects {
25 | project.buildDir = "${rootProject.buildDir}/${project.name}"
26 | }
27 | subprojects {
28 | project.evaluationDependsOn(':app')
29 | }
30 |
31 | task clean(type: Delete) {
32 | delete rootProject.buildDir
33 | }
34 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.enableR8=true
3 | android.useAndroidX=true
4 | android.enableJetifier=true
5 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
7 |
--------------------------------------------------------------------------------
/android/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/android/logo.png
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/android/settings_aar.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/assets/fonts/Aleo-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/assets/fonts/Aleo-Bold.ttf
--------------------------------------------------------------------------------
/assets/fonts/Aleo-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/assets/fonts/Aleo-Italic.ttf
--------------------------------------------------------------------------------
/assets/fonts/Aleo-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/assets/fonts/Aleo-Light.ttf
--------------------------------------------------------------------------------
/assets/fonts/Aleo-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/assets/fonts/Aleo-Regular.ttf
--------------------------------------------------------------------------------
/assets/fonts/custom/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/assets/fonts/custom/iconfont.ttf
--------------------------------------------------------------------------------
/flutter_libs/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 216dee60c0cc9449f0b29bcf922974d612263e24
8 | channel: stable
9 |
10 | project_type: package
11 |
--------------------------------------------------------------------------------
/flutter_libs/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## [0.0.1] - TODO: Add release date.
2 |
3 | * TODO: Describe initial release.
4 |
--------------------------------------------------------------------------------
/flutter_libs/LICENSE:
--------------------------------------------------------------------------------
1 | TODO: Add your license here.
2 |
--------------------------------------------------------------------------------
/flutter_libs/README.md:
--------------------------------------------------------------------------------
1 | # flutter_libs
2 |
3 | A new Flutter package.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Dart
8 | [package](https://flutter.dev/developing-packages/),
9 | a library module containing code that can be shared easily across
10 | multiple Flutter or Dart projects.
11 |
12 | For help getting started with Flutter, view our
13 | [online documentation](https://flutter.dev/docs), which offers tutorials,
14 | samples, guidance on mobile development, and a full API reference.
15 |
--------------------------------------------------------------------------------
/flutter_libs/lib/dropdown_menu/dropdown_menu_controller.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/foundation.dart';
2 |
3 | class DropdownMenuController extends ChangeNotifier {
4 | double dropDownHeaderHeight;
5 |
6 | int menuIndex = 0;
7 |
8 | bool isShow = false;
9 |
10 | void show(int index) {
11 | isShow = true;
12 | menuIndex = index;
13 | notifyListeners();
14 | }
15 |
16 | void hide() {
17 | isShow = false;
18 | notifyListeners();
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/flutter_libs/lib/flutter_libs.dart:
--------------------------------------------------------------------------------
1 | library flutter_libs;
2 |
3 | export 'animated_icon_button.dart';
4 | export 'avatar_glow.dart';
5 | export 'bottom_bar_view.dart';
6 | export 'bottom_drag_widget.dart';
7 | export 'bubble_bottom_bar.dart';
8 | export 'circle_color_picker.dart';
9 | export 'circle_progress.dart';
10 | export 'curved_navigation_bar.dart';
11 | export 'dash_path.dart';
12 | export 'dialog/asset_giffy_dialog.dart';
13 | export 'dialog/network_giffy_dialog.dart';
14 | export 'drag_sort_view.dart';
15 | export 'dropdown_menu/dropdown_menu.dart';
16 | export 'flip_card.dart';
17 | export 'flutter_flip_view.dart';
18 | export 'fluttery/seekbars.dart';
19 | export 'gradient_text.dart';
20 | export 'horizontal_number_picker.dart';
21 | export 'horizontal_picker.dart';
22 | export 'indicator/dots_indicator.dart';
23 | export 'indicator/rect_indicator.dart';
24 | export 'indicator/scroll_indicator.dart';
25 | export 'like_button.dart';
26 | export 'line_bar_visualizer.dart';
27 | export 'marquee.dart';
28 | export 'nine_grid_view.dart';
29 | export 'progress_button.dart';
30 | export 'radar.dart';
31 | export 'ruler.dart';
32 | export 'skip_down_time_progress.dart';
33 | export 'slide_button.dart';
34 | export 'slide_menu_item.dart';
35 | export 'sliding_up_panel.dart';
36 | export 'smooth_star_rating.dart';
37 | export 'stick_widget.dart';
38 | export 'titled_navigation_bar.dart';
39 | export 'utils.dart';
40 |
--------------------------------------------------------------------------------
/flutter_libs/lib/fluttery/src/layout_code.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/widgets.dart';
2 |
3 | class CenterAbout extends StatelessWidget {
4 |
5 | final Offset position;
6 | final Widget child;
7 |
8 | CenterAbout({
9 | key,
10 | this.position,
11 | this.child,
12 | }) : super(key: key);
13 |
14 | @override
15 | Widget build(BuildContext context) {
16 | return new Positioned(
17 | left: position.dx,
18 | top: position.dy,
19 | child: new FractionalTranslation(
20 | translation: const Offset(-0.5, -0.5),
21 | child: child,
22 | ),
23 | );
24 | }
25 | }
--------------------------------------------------------------------------------
/flutter_libs/lib/gradient_text.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class GradientText extends StatelessWidget {
4 | GradientText(
5 | this.data, {
6 | @required this.gradient,
7 | this.style,
8 | this.textAlign = TextAlign.left,
9 | });
10 |
11 | final String data;
12 | final Gradient gradient;
13 | final TextStyle style;
14 | final TextAlign textAlign;
15 |
16 | @override
17 | Widget build(BuildContext context) {
18 | return ShaderMask(
19 | shaderCallback: (bounds) =>
20 | gradient.createShader(Offset.zero & bounds.size),
21 | blendMode: BlendMode.srcIn,
22 | child: Text(
23 | data,
24 | textAlign: textAlign,
25 | style: (style == null)
26 | ? TextStyle(color: Colors.white)
27 | : style.copyWith(color: Colors.white),
28 | ),
29 | );
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/flutter_libs/lib/utils.dart:
--------------------------------------------------------------------------------
1 | import 'dart:math' as math;
2 | import 'dart:ui' as ui;
3 |
4 | import 'package:flutter/material.dart';
5 |
6 | num degToRad(num deg) => deg * (math.pi / 180.0);
7 |
8 | num radToDeg(num rad) => rad * (180.0 / math.pi);
9 |
10 | double mapValueFromRangeToRange(double value, double fromLow, double fromHigh,
11 | double toLow, double toHigh) =>
12 | toLow + ((value - fromLow) / (fromHigh - fromLow) * (toHigh - toLow));
13 |
14 | double clamp(double value, double low, double high) =>
15 | math.min(math.max(value, low), high);
16 |
17 | /// 绘制文字
18 | drawText(Canvas canvas, String text, Offset offset,
19 | {Color color = Colors.black,
20 | double width = 40,
21 | double fontSize,
22 | String fontFamily,
23 | TextAlign textAlign = TextAlign.center,
24 | FontWeight fontWeight = FontWeight.bold}) {
25 | /// 新建一个段落建造器,然后将文字基本信息填入;
26 | var paragraphBuilder = ui.ParagraphBuilder(
27 | ui.ParagraphStyle(
28 | fontFamily: fontFamily,
29 | textAlign: textAlign,
30 | fontSize: fontSize,
31 | fontWeight: fontWeight,
32 | ),
33 | );
34 | paragraphBuilder
35 | ..pushStyle(
36 | ui.TextStyle(color: color, textBaseline: ui.TextBaseline.alphabetic))
37 | ..addText(text);
38 |
39 | /// 这里需要先layout,将宽度约束填入,否则无法绘制
40 | var paragraph = paragraphBuilder.build()..layout(
41 |
42 | /// 设置文本的宽度约束
43 | ui.ParagraphConstraints(width: width));
44 | canvas.drawParagraph(paragraph, Offset(offset.dx, offset.dy));
45 | }
46 |
--------------------------------------------------------------------------------
/flutter_libs/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_libs
2 | description: A new Flutter package.
3 | version: 0.0.1
4 | author: 师春雷 <1558053958@qq.com>
5 | homepage: https://github.com/shichunlei/flutter_app/flutter_libs
6 |
7 | environment:
8 | sdk: ">=2.10.0 <3.0.0"
9 |
10 | dependencies:
11 | flutter:
12 | sdk: flutter
13 |
14 | dev_dependencies:
15 | flutter_test:
16 | sdk: flutter
17 |
18 | flutter_lints: ^1.0.4
19 |
20 | # For information on the generic Dart part of this file, see the
21 | # following page: https://dart.dev/tools/pub/pubspec
22 |
23 | # The following section is specific to Flutter.
24 | flutter:
25 |
--------------------------------------------------------------------------------
/images/2.0x/femal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/2.0x/femal.png
--------------------------------------------------------------------------------
/images/2.0x/icon_nav_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/2.0x/icon_nav_logo.png
--------------------------------------------------------------------------------
/images/2.0x/write.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/2.0x/write.png
--------------------------------------------------------------------------------
/images/3.0x/femal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/3.0x/femal.png
--------------------------------------------------------------------------------
/images/3.0x/icon_nav_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/3.0x/icon_nav_logo.png
--------------------------------------------------------------------------------
/images/3.0x/write.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/3.0x/write.png
--------------------------------------------------------------------------------
/images/add_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/add_image.png
--------------------------------------------------------------------------------
/images/bg_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/bg_blue.png
--------------------------------------------------------------------------------
/images/empty.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/empty.jpeg
--------------------------------------------------------------------------------
/images/femal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/femal.png
--------------------------------------------------------------------------------
/images/flare/Teddy.flr:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/flare/Teddy.flr
--------------------------------------------------------------------------------
/images/flutter_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/flutter_logo.png
--------------------------------------------------------------------------------
/images/flutterlogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/flutterlogo.png
--------------------------------------------------------------------------------
/images/ic_index_bar_bubble_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/ic_index_bar_bubble_gray.png
--------------------------------------------------------------------------------
/images/icon_crash_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/icon_crash_logo.png
--------------------------------------------------------------------------------
/images/icon_guiji.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/icon_guiji.png
--------------------------------------------------------------------------------
/images/icon_nav_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/icon_nav_logo.png
--------------------------------------------------------------------------------
/images/icon_rili.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/icon_rili.png
--------------------------------------------------------------------------------
/images/icon_train.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/icon_train.png
--------------------------------------------------------------------------------
/images/kexin_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/kexin_icon.png
--------------------------------------------------------------------------------
/images/kexin_text.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/kexin_text.png
--------------------------------------------------------------------------------
/images/left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/left.png
--------------------------------------------------------------------------------
/images/loading.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/loading.png
--------------------------------------------------------------------------------
/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/logo.png
--------------------------------------------------------------------------------
/images/middle.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/middle.jpg
--------------------------------------------------------------------------------
/images/onboarding0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/onboarding0.png
--------------------------------------------------------------------------------
/images/onboarding1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/onboarding1.png
--------------------------------------------------------------------------------
/images/onboarding2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/onboarding2.png
--------------------------------------------------------------------------------
/images/planeroute_white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/planeroute_white.png
--------------------------------------------------------------------------------
/images/player_needle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/player_needle.png
--------------------------------------------------------------------------------
/images/point.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/point.png
--------------------------------------------------------------------------------
/images/qdaily/all_column_unsub.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/qdaily/all_column_unsub.png
--------------------------------------------------------------------------------
/images/qdaily/bg_whatsnew_bg_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/qdaily/bg_whatsnew_bg_1.jpg
--------------------------------------------------------------------------------
/images/qdaily/bg_whatsnew_bg_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/qdaily/bg_whatsnew_bg_2.jpg
--------------------------------------------------------------------------------
/images/qdaily/bg_whatsnew_bg_3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/qdaily/bg_whatsnew_bg_3.jpg
--------------------------------------------------------------------------------
/images/qdaily/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/qdaily/ic_launcher.png
--------------------------------------------------------------------------------
/images/qdaily/icon_lab_vot_join.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/qdaily/icon_lab_vot_join.png
--------------------------------------------------------------------------------
/images/qdaily/icon_lab_vot_new.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/qdaily/icon_lab_vot_new.png
--------------------------------------------------------------------------------
/images/qdaily/icon_menu_about_day.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/qdaily/icon_menu_about_day.png
--------------------------------------------------------------------------------
/images/qdaily/icon_menu_category_day.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/qdaily/icon_menu_category_day.png
--------------------------------------------------------------------------------
/images/qdaily/icon_menu_column_day.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/qdaily/icon_menu_column_day.png
--------------------------------------------------------------------------------
/images/qdaily/icon_menu_feedback_day.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/qdaily/icon_menu_feedback_day.png
--------------------------------------------------------------------------------
/images/qdaily/icon_menu_notification_day.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/qdaily/icon_menu_notification_day.png
--------------------------------------------------------------------------------
/images/qdaily/icon_menu_usercenter_day.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/qdaily/icon_menu_usercenter_day.png
--------------------------------------------------------------------------------
/images/qdaily/icon_toolbar_comment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/qdaily/icon_toolbar_comment.png
--------------------------------------------------------------------------------
/images/qdaily/icon_toolbar_like_unpressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/qdaily/icon_toolbar_like_unpressed.png
--------------------------------------------------------------------------------
/images/qdaily/qdaily_logo.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/qdaily/qdaily_logo.jpeg
--------------------------------------------------------------------------------
/images/qdaily/yellowDot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/qdaily/yellowDot.png
--------------------------------------------------------------------------------
/images/reader/icon_me_vip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/reader/icon_me_vip.png
--------------------------------------------------------------------------------
/images/reader/icon_tab_bookshelf_n.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/reader/icon_tab_bookshelf_n.png
--------------------------------------------------------------------------------
/images/reader/icon_tab_bookshelf_p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/reader/icon_tab_bookshelf_p.png
--------------------------------------------------------------------------------
/images/reader/icon_tab_home_n.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/reader/icon_tab_home_n.png
--------------------------------------------------------------------------------
/images/reader/icon_tab_home_p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/reader/icon_tab_home_p.png
--------------------------------------------------------------------------------
/images/reader/icon_tab_me_n.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/reader/icon_tab_me_n.png
--------------------------------------------------------------------------------
/images/reader/icon_tab_me_p.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/reader/icon_tab_me_p.png
--------------------------------------------------------------------------------
/images/right.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/right.jpg
--------------------------------------------------------------------------------
/images/right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/right.png
--------------------------------------------------------------------------------
/images/rumor_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/rumor_icon.png
--------------------------------------------------------------------------------
/images/rumor_text.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/rumor_text.png
--------------------------------------------------------------------------------
/images/shangwudinglun_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/shangwudinglun_icon.png
--------------------------------------------------------------------------------
/images/shangwudinglun_text.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/shangwudinglun_text.png
--------------------------------------------------------------------------------
/images/splash.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/splash.jpg
--------------------------------------------------------------------------------
/images/tag_icons/tab_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/tag_icons/tab_1.png
--------------------------------------------------------------------------------
/images/tag_icons/tab_1s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/tag_icons/tab_1s.png
--------------------------------------------------------------------------------
/images/tag_icons/tab_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/tag_icons/tab_2.png
--------------------------------------------------------------------------------
/images/tag_icons/tab_2s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/tag_icons/tab_2s.png
--------------------------------------------------------------------------------
/images/tag_icons/tab_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/tag_icons/tab_3.png
--------------------------------------------------------------------------------
/images/tag_icons/tab_3s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/tag_icons/tab_3s.png
--------------------------------------------------------------------------------
/images/tag_icons/tab_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/tag_icons/tab_4.png
--------------------------------------------------------------------------------
/images/tag_icons/tab_4s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/tag_icons/tab_4s.png
--------------------------------------------------------------------------------
/images/timg.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/timg.gif
--------------------------------------------------------------------------------
/images/update_head.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/update_head.jpg
--------------------------------------------------------------------------------
/images/weather_backgrounds/back_100d.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/weather_backgrounds/back_100d.jpg
--------------------------------------------------------------------------------
/images/weather_backgrounds/back_100n.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/weather_backgrounds/back_100n.jpg
--------------------------------------------------------------------------------
/images/weather_backgrounds/back_101d.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/weather_backgrounds/back_101d.jpg
--------------------------------------------------------------------------------
/images/weather_backgrounds/back_101n.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/weather_backgrounds/back_101n.jpg
--------------------------------------------------------------------------------
/images/weather_backgrounds/back_104d.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/weather_backgrounds/back_104d.jpg
--------------------------------------------------------------------------------
/images/weather_backgrounds/back_104n.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/weather_backgrounds/back_104n.jpg
--------------------------------------------------------------------------------
/images/weather_backgrounds/back_300d.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/weather_backgrounds/back_300d.jpg
--------------------------------------------------------------------------------
/images/weather_backgrounds/back_300n.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/weather_backgrounds/back_300n.jpg
--------------------------------------------------------------------------------
/images/weather_backgrounds/back_302d.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/weather_backgrounds/back_302d.jpg
--------------------------------------------------------------------------------
/images/weather_backgrounds/back_302n.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/weather_backgrounds/back_302n.jpg
--------------------------------------------------------------------------------
/images/weather_backgrounds/back_400d.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/weather_backgrounds/back_400d.jpg
--------------------------------------------------------------------------------
/images/weather_backgrounds/back_400n.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/weather_backgrounds/back_400n.jpg
--------------------------------------------------------------------------------
/images/weather_backgrounds/back_500d.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/weather_backgrounds/back_500d.jpg
--------------------------------------------------------------------------------
/images/weather_backgrounds/back_500n.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/weather_backgrounds/back_500n.jpg
--------------------------------------------------------------------------------
/images/weather_backgrounds/back_502d.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/weather_backgrounds/back_502d.jpg
--------------------------------------------------------------------------------
/images/weather_backgrounds/back_502n.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/weather_backgrounds/back_502n.jpg
--------------------------------------------------------------------------------
/images/weather_backgrounds/back_503d.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/weather_backgrounds/back_503d.jpg
--------------------------------------------------------------------------------
/images/weather_backgrounds/back_503n.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/weather_backgrounds/back_503n.jpg
--------------------------------------------------------------------------------
/images/weather_backgrounds/back_900d.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/weather_backgrounds/back_900d.jpg
--------------------------------------------------------------------------------
/images/weather_backgrounds/back_901d.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/weather_backgrounds/back_901d.jpg
--------------------------------------------------------------------------------
/images/weather_backgrounds/back_901n.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/weather_backgrounds/back_901n.jpg
--------------------------------------------------------------------------------
/images/write.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/write.png
--------------------------------------------------------------------------------
/images/xianyu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/xianyu.png
--------------------------------------------------------------------------------
/images/yiqing_yidian_one.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/yiqing_yidian_one.png
--------------------------------------------------------------------------------
/images/yiqing_yidian_two.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/images/yiqing_yidian_two.png
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/app.flx
22 | Flutter/app.zip
23 | Flutter/flutter_assets/
24 | Flutter/flutter_export_environment.sh
25 | ServiceDefinitions.json
26 | Runner/GeneratedPluginRegistrant.*
27 |
28 | # Exceptions to above rules.
29 | !default.mode1v3
30 | !default.mode2v3
31 | !default.pbxuser
32 | !default.perspectivev3
33 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 9.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shichunlei/flutter_app/264291611b64bdd16b9401bc16ab0b02dccd0f7d/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/ios/Runner/GeneratedPluginRegistrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #ifndef GeneratedPluginRegistrant_h
8 | #define GeneratedPluginRegistrant_h
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface GeneratedPluginRegistrant : NSObject
15 | + (void)registerWithRegistry:(NSObject*)registry;
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 | #endif /* GeneratedPluginRegistrant_h */
20 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/lib/animation/animated_align.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class AnimatedAlignDemo extends StatefulWidget {
4 | AnimatedAlignDemo({Key key}) : super(key: key);
5 |
6 | @override
7 | createState() => _AnimatedAlignDemoState();
8 | }
9 |
10 | class _AnimatedAlignDemoState extends State {
11 | bool status = true;
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | return Scaffold(
16 | backgroundColor: Colors.grey[200],
17 | appBar: AppBar(title: Text('AnimatedAlign')),
18 | body: AnimatedAlign(
19 | alignment: status ? Alignment.bottomLeft : Alignment.topRight,
20 | duration: Duration(milliseconds: 1500),
21 | child: FlutterLogo()),
22 | floatingActionButton: FloatingActionButton(
23 | onPressed: () {
24 | setState(() => status = !status);
25 | },
26 | child: Icon(Icons.brush)));
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/lib/animation/animated_builder.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class AnimatedBuilderDemo extends StatefulWidget {
4 | const AnimatedBuilderDemo({Key key}) : super(key: key);
5 |
6 | @override
7 | createState() => _AnimatedBuilderDemoState();
8 | }
9 |
10 | class _AnimatedBuilderDemoState extends State with SingleTickerProviderStateMixin {
11 | AnimationController controller;
12 |
13 | @override
14 | void initState() {
15 | super.initState();
16 | controller = AnimationController(duration: const Duration(seconds: 3), vsync: this)..forward();
17 | }
18 |
19 | @override
20 | void dispose() {
21 | controller?.dispose();
22 | super.dispose();
23 | }
24 |
25 | @override
26 | Widget build(BuildContext context) {
27 | return Scaffold(
28 | backgroundColor: Colors.grey[200],
29 | appBar: AppBar(title: const Text('AnimatedBuilder')),
30 | body: Center(
31 | child: AnimatedBuilder(
32 | animation: controller,
33 | child: Container(width: 200.0, height: 200.0, color: Colors.green),
34 | builder: (BuildContext context, Widget child) {
35 | debugPrint('${controller.value}');
36 | return Transform.scale(scale: controller.value, child: child);
37 | }),
38 | ));
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/lib/animation/animated_cross_fade.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | import 'package:flutter/material.dart';
4 |
5 | /// AnimatedCrossFade让俩个子widget 交替淡入淡出。
6 |
7 | class AnimatedCrossFadeDemo extends StatefulWidget {
8 | AnimatedCrossFadeDemo({Key key}) : super(key: key);
9 |
10 | @override
11 | createState() => _AnimatedCrossFadeDemoState();
12 | }
13 |
14 | class _AnimatedCrossFadeDemoState extends State {
15 | var _first = false;
16 |
17 | @override
18 | Widget build(BuildContext context) {
19 | Timer(Duration(seconds: 3), () {
20 | setState(() {
21 | _first = !_first;
22 | });
23 | });
24 |
25 | return Scaffold(
26 | backgroundColor: Colors.grey[200],
27 | appBar: AppBar(title: Text('AnimatedCrossFade')),
28 | body: Center(
29 | child: AnimatedCrossFade(
30 | duration: const Duration(milliseconds: 300),
31 | firstChild: const FlutterLogo(
32 | style: FlutterLogoStyle.horizontal, size: 100.0),
33 | secondChild:
34 | const FlutterLogo(style: FlutterLogoStyle.stacked, size: 100.0),
35 | crossFadeState:
36 | _first ? CrossFadeState.showFirst : CrossFadeState.showSecond,
37 | ),
38 | ));
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/lib/animation/animated_number.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'utils/animations.dart';
4 |
5 | class AnimatedNumberDemo extends StatelessWidget {
6 | AnimatedNumberDemo({Key key}) : super(key: key);
7 |
8 | @override
9 | Widget build(BuildContext context) {
10 | return Scaffold(
11 | backgroundColor: Colors.grey[200],
12 | appBar: AppBar(title: Text('AnimatedNumberDemo')),
13 | body: Center(
14 | child: AnimatedNumber(
15 | number: 1000,
16 | ),
17 | ),
18 | );
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/lib/animation/animated_opacity.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class AnimatedOpacityDemo extends StatefulWidget {
4 | const AnimatedOpacityDemo({Key key}) : super(key: key);
5 |
6 | @override
7 | createState() => _AnimatedOpacityDemoState();
8 | }
9 |
10 | class _AnimatedOpacityDemoState extends State {
11 | bool forward = true;
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | return Scaffold(
16 | appBar: AppBar(title: const Text('FlutterLogo')),
17 | body: Center(
18 | child: AnimatedOpacity(
19 | child: const FlutterLogo(size: 200.0),
20 | duration: const Duration(milliseconds: 2000),
21 | opacity: forward ? 1.0 : 0.0)),
22 | floatingActionButton: FloatingActionButton(
23 | onPressed: () {
24 | setState(() => forward = !forward);
25 | },
26 | child: const Icon(Icons.brush)));
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/lib/animation/animated_padding.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class AnimatedPaddingDemo extends StatefulWidget {
4 | AnimatedPaddingDemo({Key key}) : super(key: key);
5 |
6 | @override
7 | createState() => _AnimatedPaddingDemoState();
8 | }
9 |
10 | class _AnimatedPaddingDemoState extends State {
11 | bool forward = true;
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | return Scaffold(
16 | backgroundColor: Colors.grey[200],
17 | appBar: AppBar(title: Text('AnimatedPadding')),
18 | body: Center(
19 | child: Container(
20 | child: AnimatedPadding(
21 | padding: EdgeInsets.all(forward ? 50 : 0),
22 | duration: Duration(milliseconds: 500),
23 | child: Text('AnimatedPaddingDemo')),
24 | color: Colors.red)),
25 | floatingActionButton: FloatingActionButton(
26 | onPressed: () {
27 | setState(() => forward = !forward);
28 | },
29 | child: Icon(Icons.brush)));
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/lib/animation/animated_positioned.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class AnimatedPositionedDemo extends StatefulWidget {
4 | AnimatedPositionedDemo({Key key}) : super(key: key);
5 |
6 | @override
7 | createState() => _AnimatedPositionedDemoState();
8 | }
9 |
10 | class _AnimatedPositionedDemoState extends State {
11 | bool status = true;
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | return Scaffold(
16 | backgroundColor: Colors.grey[200],
17 | appBar: AppBar(title: Text('AnimatedPositioned')),
18 | body: Stack(children: [
19 | AnimatedPositioned(
20 | top: status ? 50 : 100,
21 | height: status ? 50 : 100,
22 | left: status ? 50 : 100,
23 | curve: Curves.elasticInOut,
24 | child: Container(
25 | padding: EdgeInsets.all(8.0),
26 | alignment: Alignment.center,
27 | color: Colors.deepPurpleAccent,
28 | child: Text("AnimatedPositioned动画演示")),
29 | duration: Duration(milliseconds: 500))
30 | ]),
31 | floatingActionButton: FloatingActionButton(
32 | onPressed: () {
33 | setState(() => status = !status);
34 | },
35 | child: Icon(Icons.brush)));
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/lib/animation/animated_size.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class AnimatedSizeDemo extends StatefulWidget {
4 | AnimatedSizeDemo({Key key}) : super(key: key);
5 |
6 | @override
7 | createState() => _AnimatedSizeDemoState();
8 | }
9 |
10 | class _AnimatedSizeDemoState extends State with SingleTickerProviderStateMixin {
11 | bool status = true;
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | return Scaffold(
16 | backgroundColor: Colors.grey[200],
17 | appBar: AppBar(title: Text('AnimatedSize')),
18 | body: Center(
19 | child: AnimatedSize(
20 | alignment: Alignment.center,
21 | curve: Curves.fastOutSlowIn,
22 | child: Container(
23 | alignment: Alignment.center,
24 | color: Colors.deepPurpleAccent,
25 | // 对高度进行了演示。
26 | height: status ? 60 : 150,
27 | child: Text("AnimatedSize动画演示")),
28 | duration: Duration(milliseconds: 500)),
29 | ),
30 | floatingActionButton: FloatingActionButton(
31 | onPressed: () {
32 | setState(() => status = !status);
33 | },
34 | child: Icon(Icons.brush)));
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/lib/animation/relative_positioned_transition.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class RelativePositionedTransitionDemo extends StatefulWidget {
4 | const RelativePositionedTransitionDemo({Key key}) : super(key: key);
5 |
6 | @override
7 | createState() => _RelativePositionedTransitionDemoState();
8 | }
9 |
10 | class _RelativePositionedTransitionDemoState
11 | extends State
12 | with SingleTickerProviderStateMixin {
13 | AnimationController _animationController;
14 | Animation _animation;
15 |
16 | @override
17 | void initState() {
18 | super.initState();
19 |
20 | _animationController =
21 | AnimationController(duration: Duration(seconds: 2), vsync: this);
22 |
23 | _animation = RectTween(
24 | begin: Rect.fromLTRB(10.0, 10.0, 10.0, 10.0),
25 | end: Rect.fromLTRB(300.0, 300.0, 0.0, 0.0))
26 | .animate(_animationController);
27 |
28 | // 开始动画
29 | _animationController.forward();
30 | }
31 |
32 | @override
33 | Widget build(BuildContext context) {
34 | return Container(
35 | height: 300,
36 | width: 300,
37 | color: Colors.blue,
38 | child: Stack(children: [
39 | RelativePositionedTransition(
40 | rect: _animation,
41 | size: Size(0.0, 0.0),
42 | child: Container(color: Colors.red))
43 | ]));
44 | }
45 |
46 | @override
47 | void dispose() {
48 | _animationController.dispose();
49 | super.dispose();
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/lib/article/index.dart:
--------------------------------------------------------------------------------
1 | export 'collect_article.dart';
2 |
3 | export 'db/article_provider.dart';
4 |
5 | export '../bean/article.dart';
6 |
--------------------------------------------------------------------------------
/lib/baixing_life/index.dart:
--------------------------------------------------------------------------------
1 | export 'db/goods_provider.dart';
2 | export 'db/address_provider.dart';
3 |
4 | export 'page/about.dart';
5 | export 'page/classify.dart';
6 | export 'page/home.dart';
7 | export 'page/member.dart';
8 | export 'page/shop_info.dart';
9 | export 'page/shops.dart';
10 | export 'page/shopping_cart.dart';
11 | export 'page/details_page.dart';
12 | export 'page/order_home_page.dart';
13 |
14 | export 'ui/cart_amount_view.dart';
15 | export 'ui/empty_shop_cart.dart';
16 | export 'ui/item_cart_goods.dart';
17 | export 'ui/item_floor_goods.dart';
18 | export 'ui/item_goods_grid.dart';
19 | export 'ui/item_home_floor.dart';
20 | export 'ui/item_order.dart';
21 | export 'ui/item_order_goods.dart';
22 | export 'ui/left_menu.dart';
23 | export 'ui/right_listview.dart';
24 |
25 | export '../bean/baixing.dart';
26 |
27 | export 'page/address/address_page.dart';
28 | export 'page/address/create_edit_address_page.dart';
29 | export 'page/address/item_address.dart';
30 | export 'page/address/menu_reveal.dart';
31 |
--------------------------------------------------------------------------------
/lib/baixing_life/page/about.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class AboutPage extends StatelessWidget {
4 | const AboutPage({Key key}) : super(key: key);
5 |
6 | @override
7 | Widget build(BuildContext context) {
8 | return Scaffold(
9 | appBar: AppBar(title: Text('关于商城')),
10 | body: SingleChildScrollView(
11 | child: Container(
12 | child: Image.network(
13 | 'http://images.baixingliangfan.cn/aboutUs2.jpg',
14 | fit: BoxFit.fitWidth))));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/lib/baixing_life/page/address/menu_reveal.dart:
--------------------------------------------------------------------------------
1 | import 'dart:math';
2 |
3 | import 'package:flutter/material.dart';
4 |
5 | // https://github.com/alibaba/flutter-go/blob/master/lib/views/fourth_page/page_reveal.dart
6 | class MenuReveal extends StatelessWidget {
7 | final double revealPercent;
8 | final Widget child;
9 |
10 | MenuReveal({this.revealPercent, this.child});
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return ClipOval(clipper: CircleRevealClipper(revealPercent), child: child);
15 | }
16 | }
17 |
18 | class CircleRevealClipper extends CustomClipper {
19 | final double revealPercent;
20 |
21 | CircleRevealClipper(this.revealPercent);
22 |
23 | @override
24 | Rect getClip(Size size) {
25 | // 右上角的点击点为圆心
26 | final epicenter = Offset(size.width - 25.0, 25.0);
27 |
28 | double theta = atan(epicenter.dy / epicenter.dx);
29 | final distanceToCorner = (epicenter.dy) / sin(theta);
30 |
31 | final radius = distanceToCorner * revealPercent;
32 | final diameter = 2 * radius;
33 |
34 | return Rect.fromLTWH(
35 | epicenter.dx - radius, epicenter.dy - radius, diameter, diameter);
36 | }
37 |
38 | @override
39 | bool shouldReclip(CustomClipper oldClipper) => true;
40 | }
41 |
--------------------------------------------------------------------------------
/lib/baixing_life/page/shop_info.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_app/page_index.dart';
3 |
4 | class ShopInfoPage extends StatefulWidget {
5 | final String id;
6 | final String name;
7 |
8 | const ShopInfoPage({Key key, @required this.id,@required this.name}) : super(key: key);
9 |
10 | @override
11 | createState() => _ShopInfoPageState();
12 | }
13 |
14 | class _ShopInfoPageState extends State {
15 | ShopInfo shopInfo;
16 |
17 | @override
18 | void initState() {
19 | super.initState();
20 |
21 | getShopInfo(widget.id);
22 | }
23 |
24 | @override
25 | void dispose() {
26 | super.dispose();
27 | }
28 |
29 | @override
30 | Widget build(BuildContext context) {
31 | return Scaffold(
32 | backgroundColor: Colors.grey[200],
33 | appBar: AppBar(title: Text('${widget.name}')),
34 | body: Column(
35 | children: [],
36 | ),
37 | );
38 | }
39 |
40 | void getShopInfo(String id) async {
41 | shopInfo = await ShoppingRepository.getBaixingShopInfo(id);
42 |
43 | setState(() {});
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/lib/baixing_life/ui/cart_amount_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_app/store/index.dart';
3 |
4 | import '../index.dart';
5 |
6 | class CartAmountView extends StatelessWidget {
7 | final Goods goods;
8 |
9 | CartAmountView({Key key, @required this.goods}) : super(key: key);
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | var state = Store.value(context);
14 | return Container(
15 | decoration: BoxDecoration(
16 | border: Border.all(width: 1.0, color: Colors.grey),
17 | borderRadius: BorderRadius.all(Radius.circular(8.0))),
18 | child: Row(
19 | mainAxisSize: MainAxisSize.min,
20 | children: [
21 | GestureDetector(
22 | child: Icon(Icons.remove,
23 | size: 25,
24 | color: goods.number > 1 ? Colors.black : Colors.grey),
25 | onTap: goods.number > 1
26 | ? () => state.minusGoodsAmount(goods)
27 | : null),
28 | Container(width: 1.0, color: Colors.grey, height: 25),
29 | Container(
30 | child: Text(' ${goods.number} '),
31 | width: 35.0,
32 | alignment: Alignment.center),
33 | Container(width: 1.0, color: Colors.grey, height: 25),
34 | GestureDetector(
35 | child: Icon(Icons.add, size: 25),
36 | onTap: () => state.addGoodsAmount(goods))
37 | ],
38 | ),
39 | );
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/lib/baixing_life/ui/empty_shop_cart.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_app/store/index.dart';
3 |
4 | import '../../page_index.dart';
5 |
6 | class EmptyShopCart extends StatelessWidget {
7 | EmptyShopCart({Key key}) : super(key: key);
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return Center(
12 | child: Column(
13 | crossAxisAlignment: CrossAxisAlignment.center,
14 | mainAxisAlignment: MainAxisAlignment.center,
15 | children: [
16 | CircleAvatar(
17 | radius: 40.0,
18 | child: Icon(Icons.shopping_cart, color: Colors.grey, size: 40.0),
19 | backgroundColor: Colors.grey[100]),
20 | Gaps.vGap15,
21 | Text('购物车还空着,快去挑选商品吧'),
22 | Gaps.vGap15,
23 | Button(
24 | onPressed: () {
25 | Store.value(context, listen: false)
26 | .setPageIndex(0);
27 | },
28 | child: Text('随便逛逛', style: TextStyle(fontSize: 18)),
29 | color: Colors.red,
30 | halfRadius: true,
31 | width: 120,
32 | height: 36)
33 | ]));
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/lib/baixing_life/ui/item_floor_goods.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../page_index.dart';
4 | import '../index.dart';
5 |
6 | class ItemFloorGoods extends StatelessWidget {
7 | final String goodsId;
8 | final String goodsImage;
9 | final double height;
10 | final double width;
11 |
12 | ItemFloorGoods(
13 | this.goodsId,
14 | this.goodsImage, {
15 | Key key,
16 | this.width,
17 | this.height,
18 | }) : super(key: key);
19 |
20 | @override
21 | Widget build(BuildContext context) {
22 | return Container(
23 | width: width,
24 | height: height,
25 | child: GestureDetector(
26 | child: ImageLoadView('$goodsImage'),
27 | onTap: () => pushNewPage(context, DetailsPage(goodsId))));
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/bars_demo/each_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class EachView extends StatelessWidget {
4 | final String title;
5 |
6 | EachView(
7 | this.title, {
8 | Key key,
9 | }) : super(key: key);
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | return Scaffold(
14 | appBar: AppBar(title: Text(title), automaticallyImplyLeading: false),
15 | body: Center(
16 | child: Text(title),
17 | ),
18 | );
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/lib/bars_demo/fancy_bottom_navigation.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:fancy_bottom_navigation/fancy_bottom_navigation.dart';
3 | import 'package:flutter_app/bars_demo/each_view.dart';
4 |
5 | class FancyBottomNavigationBar extends StatefulWidget {
6 | FancyBottomNavigationBar({Key key}) : super(key: key);
7 |
8 | @override
9 | createState() => _FancyBottomNavigationBarState();
10 | }
11 |
12 | class _FancyBottomNavigationBarState extends State
13 | with SingleTickerProviderStateMixin {
14 | int currentPage = 0;
15 |
16 | List list = [];
17 |
18 | @override
19 | void initState() {
20 | super.initState();
21 | list
22 | ..add(EachView('Home'))
23 | ..add(EachView('Search'))
24 | ..add(EachView('Basket'));
25 | }
26 |
27 | @override
28 | void dispose() {
29 | super.dispose();
30 | }
31 |
32 | @override
33 | Widget build(BuildContext context) {
34 | return Scaffold(
35 | body: list[currentPage],
36 | bottomNavigationBar: FancyBottomNavigation(
37 | onTabChangedListener: (int position) {
38 | setState(() {
39 | currentPage = position;
40 | });
41 | },
42 | circleColor: Colors.teal,
43 | initialSelection: 1,
44 | tabs: [
45 | TabData(iconData: Icons.home, title: "Home"),
46 | TabData(iconData: Icons.search, title: "Search"),
47 | TabData(iconData: Icons.shopping_cart, title: "Basket")
48 | ],
49 | ),
50 | );
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/lib/bars_demo/keep_alive.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class KeepAliveWidget extends StatefulWidget {
4 | @override
5 | createState() => KeepAliveWidgetState();
6 | }
7 |
8 | class KeepAliveWidgetState extends State
9 | with AutomaticKeepAliveClientMixin {
10 | @override
11 | bool get wantKeepAlive => true;
12 |
13 | int _counter = 0;
14 |
15 | @override
16 | Widget build(BuildContext context) {
17 | super.build(context);
18 | return Scaffold(
19 | body: Center(
20 | child: Column(
21 | mainAxisAlignment: MainAxisAlignment.center,
22 | children: [
23 | Text("点一次增加一个数字"),
24 | Text('$_counter', style: Theme.of(context).textTheme.headline1)
25 | ])),
26 | floatingActionButton: FloatingActionButton(
27 | onPressed: () => setState(() => _counter++),
28 | tooltip: "Increment",
29 | child: Icon(Icons.add)));
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/lib/base/provider_stless_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:provider/provider.dart';
3 |
4 | import 'base_model.dart';
5 |
6 | class ProviderStatelessWidget extends StatelessWidget {
7 | final ValueWidgetBuilder builder;
8 | final T model;
9 | final Widget child;
10 |
11 | ProviderStatelessWidget({
12 | Key key,
13 | @required this.builder,
14 | @required this.model,
15 | this.child,
16 | }) : super(key: key);
17 |
18 | @override
19 | Widget build(BuildContext context) {
20 | model.setContext(context);
21 | return ChangeNotifierProvider.value(
22 | value: model, child: Consumer(builder: builder, child: child));
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/base/test_list_model.dart:
--------------------------------------------------------------------------------
1 | import '../page_index.dart';
2 | import 'base_list_model.dart';
3 |
4 | class TextListModel extends BaseListModel {
5 | @override
6 | Future> loadData() async {
7 | return await OtherRepository.getJuZiMiListByType("aiqing", pageNumber);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/lib/base/text_model.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_app/bean/index.dart';
2 | import 'package:flutter_app/service/other_repository.dart';
3 |
4 | import 'base_object_model.dart';
5 |
6 | class TextModel extends BaseObjectModel {
7 | List tagRecommendCourses = [];
8 | List banners = [];
9 | List popularCourse = [];
10 | List discover = [];
11 |
12 | @override
13 | Future loadData() async {
14 | int t = DateTime.now().millisecondsSinceEpoch;
15 |
16 | return await OtherRepository.getYouDaoHomeHead(t);
17 | }
18 |
19 | @override
20 | onCompleted(YouDaoData data) {
21 | banners = data.head;
22 | popularCourse = data.popularCourse;
23 | tagRecommendCourses.addAll(data?.tagRecommendCourses);
24 | discover = data.discover;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/lib/bean/base_result.dart:
--------------------------------------------------------------------------------
1 | class BaseResult {
2 | String code;
3 | bool status;
4 | String message;
5 | T data;
6 |
7 | BaseResult({this.code, this.status, this.message, this.data});
8 |
9 | static BaseResult fromMap(Map map) {
10 | if (map == null) return null;
11 | BaseResult result = BaseResult();
12 | result.code = '${map['code']}';
13 | result.status = map['status'];
14 | result.message = map['message'];
15 | result.data = map['data'];
16 | return result;
17 | }
18 |
19 | Map toJson() => {
20 | "code": code,
21 | "message": message,
22 | "data": data,
23 | "status": status,
24 | };
25 | }
26 |
--------------------------------------------------------------------------------
/lib/bean/city.dart:
--------------------------------------------------------------------------------
1 | import 'package:azlistview/azlistview.dart';
2 | import 'package:lpinyin/lpinyin.dart';
3 |
4 | class City extends ISuspensionBean {
5 | /// 地区/城市ID
6 | String cid;
7 |
8 | /// 地区/城市名称
9 | String location;
10 |
11 | /// 该地区/城市的上级城市
12 | String parentCity;
13 |
14 | /// 该地区/城市所属行政区域
15 | String adminArea;
16 |
17 | /// 该地区/城市所属国家名称
18 | String cnty;
19 |
20 | /// 地区/城市纬度
21 | String lat;
22 |
23 | /// 地区/城市经度
24 | String lon;
25 |
26 | /// 该地区/城市所在时区
27 | String tz;
28 |
29 | ///
30 | String type;
31 |
32 | String firstLetter;
33 |
34 | City(
35 | {this.cid,
36 | this.location,
37 | this.tz,
38 | this.cnty,
39 | this.type,
40 | this.lon,
41 | this.lat,
42 | this.parentCity,
43 | this.adminArea,
44 | this.firstLetter});
45 |
46 | static City fromMap(Map map) {
47 | City city = City();
48 | city.type = map['type'];
49 | city.cid = map['cid'];
50 | city.location = map['location'];
51 | city.adminArea = map['admin_area'];
52 | city.parentCity = map['parent_city'];
53 | city.lon = map['lon'];
54 | city.cnty = map['cnty'];
55 | city.tz = map['tz'];
56 | String tag = PinyinHelper.getPinyinE(map['location'])[0].toUpperCase();
57 | if (RegExp("[A-Z]").hasMatch(tag)) {
58 | city.firstLetter = tag;
59 | } else {
60 | city.firstLetter = "#";
61 | }
62 | return city;
63 | }
64 |
65 | @override
66 | String getSuspensionTag() {
67 | return firstLetter;
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/lib/bean/country.dart:
--------------------------------------------------------------------------------
1 | /// py_full : "gelunbiya"
2 | /// zone_phone : "57"
3 | /// py_index : "G"
4 | /// zone_time : 0
5 | /// py_short : "glby"
6 | /// name_en : "Colombia"
7 | /// name : "哥伦比亚"
8 |
9 | class Country {
10 | String pyFull;
11 | String zonePhone;
12 | String pyIndex;
13 | int zoneTime;
14 | String pyShort;
15 | String nameEn;
16 | String name;
17 |
18 | static Country fromMap(Map map) {
19 | if (map == null) return null;
20 | Country countryBean = Country();
21 | countryBean.pyFull = map['py_full'];
22 | countryBean.zonePhone = map['zone_phone'];
23 | countryBean.pyIndex = map['py_index'];
24 | countryBean.zoneTime = map['zone_time'];
25 | countryBean.pyShort = map['py_short'];
26 | countryBean.nameEn = map['name_en'];
27 | countryBean.name = map['name'];
28 | return countryBean;
29 | }
30 |
31 | Map toJson() => {
32 | "py_full": pyFull,
33 | "zone_phone": zonePhone,
34 | "py_index": pyIndex,
35 | "zone_time": zoneTime,
36 | "py_short": pyShort,
37 | "name_en": nameEn,
38 | "name": name,
39 | };
40 | }
41 |
--------------------------------------------------------------------------------
/lib/bean/hitokoto.dart:
--------------------------------------------------------------------------------
1 | /// id : 468
2 | /// hitokoto : "Yesterday is a history, tomorrow is a mystery, but today is a gift."
3 | /// type : "g"
4 | /// from : "功夫熊猫"
5 | /// creator : "efreet"
6 | /// created_at : "1468950839"
7 |
8 | class Hitokoto {
9 | /// 本条一言的id。
10 | int id;
11 |
12 | /// 一言正文。编码方式unicode。使用utf-8。
13 | String hitokoto;
14 |
15 | /// 类型
16 | /// a Anime - 动画
17 | /// b Comic – 漫画
18 | /// c Game – 游戏
19 | /// d Novel – 小说
20 | /// e Myself – 原创
21 | /// f Internet – 来自网络
22 | /// g Other – 其他
23 | String type;
24 |
25 | /// 一言的出处。
26 | String from;
27 |
28 | /// 添加者。
29 | String creator;
30 |
31 | /// 添加时间。
32 | String createdAt;
33 |
34 | static Hitokoto fromMap(Map map) {
35 | if (map == null) return null;
36 | Hitokoto hitokoto = Hitokoto();
37 | hitokoto.id = map['id'];
38 | hitokoto.hitokoto = map['hitokoto'];
39 | hitokoto.type = map['type'];
40 | hitokoto.from = map['from'];
41 | hitokoto.creator = map['creator'];
42 | hitokoto.createdAt = map['created_at'];
43 | return hitokoto;
44 | }
45 |
46 | Map toJson() => {
47 | "id": id,
48 | "hitokoto": hitokoto,
49 | "type": type,
50 | "from": from,
51 | "creator": creator,
52 | "created_at": createdAt,
53 | };
54 | }
55 |
--------------------------------------------------------------------------------
/lib/bean/image.dart:
--------------------------------------------------------------------------------
1 | class ImageModal {
2 | String id;
3 | String src;
4 | double width;
5 | double height;
6 | String thumb;
7 |
8 | // String grpCnt;
9 | bool grpMd5;
10 | int type;
11 | int index;
12 |
13 | static ImageModal fromMap(Map map) {
14 | ImageModal image = ImageModal();
15 | image.id = map['id'];
16 | image.src = map['src'];
17 | image.width = double.parse(map['width']);
18 | image.height = double.parse(map['height']);
19 | image.thumb = map['thumb'];
20 | // image.grpCnt = map['grpcnt'];
21 | image.grpMd5 = map['grpmd5'];
22 | image.type = map['type'];
23 | image.index = map['index'];
24 | return image;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/lib/bean/index.dart:
--------------------------------------------------------------------------------
1 | export 'address.dart';
2 | export 'article.dart';
3 | export 'baixing.dart';
4 | export 'base_result.dart';
5 | export 'books.dart';
6 | export 'city.dart';
7 | export 'condition.dart';
8 | export 'contact.dart';
9 | export 'doodle.dart';
10 | export 'element.dart';
11 | export 'friends_dynamic.dart';
12 | export 'he_weather.dart';
13 | export 'hitokoto.dart';
14 | export 'image.dart';
15 | export 'juzimi.dart';
16 | export 'movie.dart';
17 | export 'music.dart';
18 | export 'news.dart';
19 | export 'qdaily.dart';
20 | export 'result.dart';
21 | export 'sars_cov.dart';
22 | export 'sports.dart';
23 | export 'tiktok_video.dart';
24 | export 'tubitv.dart';
25 | export 'user.dart';
26 | export 'youdao.dart';
27 |
--------------------------------------------------------------------------------
/lib/bean/result.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_app/bean/index.dart';
2 |
3 | class Result {
4 | String title;
5 | int count;
6 | int start;
7 | int total;
8 |
9 | /// 天气
10 | List heWeather;
11 |
12 | /// 联系人
13 | List contacts;
14 |
15 | List images;
16 |
17 | static Result fromMap(Map map) {
18 | Result result = Result();
19 | result.title = map['title'] == null ? "" : map['title'];
20 | result.count = map['count'];
21 | result.start = map['start'];
22 | result.total = map['total'];
23 | result.contacts = []..addAll((map['results'] as List ?? []).map((o) => ContactBean.fromMap(o)));
24 |
25 | result.heWeather = []..addAll((map['HeWeather6'] as List ?? []).map((o) => HeWeather.fromMap(o)));
26 |
27 | result.images = (map['list'] as List ?? []).map((e) => ImageModal.fromMap(e)).toList();
28 | return result;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/bean/user.dart:
--------------------------------------------------------------------------------
1 | /// id : 6
2 | /// email : "1558053958@qq.com"
3 | /// name : ""
4 | /// mobile : ""
5 | /// avatar_url : "http://101.200.174.126:10000/data_cloud_system/users/avatars/6/medium/RackMultipart20191223-28128-1vv84sr.jpg?1577080231"
6 |
7 | class User {
8 | int id;
9 | String email;
10 | String name;
11 | String mobile;
12 | String avatarUrl;
13 |
14 | User({this.id, this.email, this.name, this.mobile, this.avatarUrl});
15 |
16 | static User fromMap(Map map) {
17 | if (map == null) return null;
18 | User userBean = User();
19 | userBean.id = map['id'];
20 | userBean.email = map['email'];
21 | userBean.name = map['name'];
22 | userBean.mobile = map['mobile'];
23 | userBean.avatarUrl = map['avatar_url'];
24 | return userBean;
25 | }
26 |
27 | Map toJson() => {
28 | "id": id,
29 | "email": email,
30 | "name": name,
31 | "mobile": mobile,
32 | "avatar_url": avatarUrl,
33 | };
34 | }
35 |
--------------------------------------------------------------------------------
/lib/contact/index.dart:
--------------------------------------------------------------------------------
1 | export 'ui/build_address.dart';
2 | export 'ui/build_email.dart';
3 | export 'ui/build_other.dart';
4 | export 'ui/build_phone.dart';
5 | export 'ui/build_row.dart';
6 | export 'ui/contact_list_header.dart';
7 | export 'ui/contact_category.dart';
8 | export 'ui/contact_item.dart';
9 |
10 | export 'page/contact_page.dart';
11 |
12 | export '../bean/contact.dart';
13 |
--------------------------------------------------------------------------------
/lib/contact/ui/build_address.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../index.dart';
4 |
5 | class BuildAddressView extends StatelessWidget {
6 | final String address;
7 | final String area;
8 |
9 | BuildAddressView({Key key, this.address, this.area}) : super(key: key);
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | return ContactCategory(
14 | icon: Icons.location_on,
15 | children: [
16 | ContactItem(
17 | icon: Icons.map,
18 | tooltip: 'Open map',
19 | onPressed: () {},
20 | lines: [
21 | '$area',
22 | '$address',
23 | 'Home',
24 | ],
25 | ),
26 | // ContactItem(
27 | // icon: Icons.map,
28 | // tooltip: 'Open map',
29 | // onPressed: () {},
30 | // lines: const [
31 | // '中国北京市海淀区',
32 | // '中关村梦想实验室8层806室',
33 | // 'Work',
34 | // ],
35 | // ),
36 | // ContactItem(
37 | // icon: Icons.map,
38 | // tooltip: 'Open map',
39 | // onPressed: () {},
40 | // lines: const [
41 | // '中国河北省衡水市',
42 | // '阜城县漫河乡前宣屯村',
43 | // 'Jet Travel',
44 | // ],
45 | // ),
46 | ],
47 | );
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/lib/contact/ui/build_email.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import '../index.dart';
3 |
4 | class BuildEmailView extends StatelessWidget {
5 | final String email;
6 |
7 | BuildEmailView({Key key, this.email}) : super(key: key);
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return ContactCategory(
12 | icon: Icons.contact_mail,
13 | children: [
14 | ContactItem(
15 | icon: Icons.email,
16 | tooltip: "Send personal e-mail",
17 | onPressed: () {},
18 | lines: [
19 | '$email',
20 | 'Personal',
21 | ],
22 | ),
23 | // ContactItem(
24 | // icon: Icons.email,
25 | // tooltip: 'Send work e-mail',
26 | // onPressed: () {},
27 | // lines: [
28 | // '$email',
29 | // 'Work',
30 | // ],
31 | // ),
32 | ],
33 | );
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/lib/contact/ui/build_other.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import '../index.dart';
3 |
4 | class BuildOtherView extends StatelessWidget {
5 | final String birthday;
6 |
7 | BuildOtherView({this.birthday});
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return ContactCategory(
12 | icon: Icons.today,
13 | children: [
14 | ContactItem(
15 | lines: [
16 | 'Birthday',
17 | '$birthday',
18 | ],
19 | ),
20 | ContactItem(
21 | lines: const [
22 | 'Wedding anniversary',
23 | 'June 21st, 2014',
24 | ],
25 | ),
26 | ContactItem(
27 | lines: const [
28 | 'First day in office',
29 | 'January 20th, 2015',
30 | ],
31 | ),
32 | ContactItem(
33 | lines: const [
34 | 'Last day in office',
35 | 'August 9th, 2018',
36 | ],
37 | ),
38 | ],
39 | );
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/lib/contact/ui/contact_category.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class ContactCategory extends StatelessWidget {
4 | final IconData icon;
5 | final List children;
6 |
7 | const ContactCategory({Key key, this.icon, this.children}) : super(key: key);
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | final ThemeData themeData = Theme.of(context);
12 | return Container(
13 | padding: const EdgeInsets.symmetric(vertical: 16.0),
14 | decoration: BoxDecoration(
15 | border: Border(
16 | bottom: BorderSide(color: themeData.dividerColor),
17 | ),
18 | ),
19 | child: DefaultTextStyle(
20 | style: Theme.of(context).textTheme.subtitle1,
21 | child: SafeArea(
22 | top: false,
23 | bottom: false,
24 | child: Row(
25 | crossAxisAlignment: CrossAxisAlignment.start,
26 | children: [
27 | Container(
28 | padding: const EdgeInsets.symmetric(vertical: 24.0),
29 | width: 72.0,
30 | child: Icon(
31 | icon,
32 | color: themeData.primaryColor,
33 | ),
34 | ),
35 | Expanded(
36 | child: Column(
37 | children: children,
38 | ),
39 | ),
40 | ],
41 | ),
42 | ),
43 | ),
44 | );
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/lib/contact/ui/contact_list_header.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class ContactListHeader extends StatelessWidget {
4 | final String name;
5 | final String phone;
6 |
7 | ContactListHeader({
8 | Key key,
9 | this.name,
10 | this.phone,
11 | }) : super(key: key);
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | return Container(
16 | color: Theme.of(context).primaryColor,
17 | child: Center(
18 | child: Column(
19 | mainAxisAlignment: MainAxisAlignment.center,
20 | children: [
21 | ClipOval(
22 | child: Image.network(
23 | 'https://github.com/huextrat/TheGorgeousLogin/blob/master/assets/img/login_logo.png?raw=true',
24 | width: 80.0,
25 | ),
26 | ),
27 | Padding(
28 | padding: const EdgeInsets.all(8.0),
29 | child: Text(
30 | this.name,
31 | textScaleFactor: 1.2,
32 | style: TextStyle(
33 | fontSize: 20.0,
34 | color: Colors.white,
35 | ),
36 | ),
37 | ),
38 | Text(
39 | this.phone,
40 | style: TextStyle(
41 | fontSize: 20.0,
42 | color: Colors.white,
43 | ),
44 | ),
45 | ],
46 | ),
47 | ),
48 | );
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/lib/delegates/custom_sliver_appbar_delegate.dart:
--------------------------------------------------------------------------------
1 | import 'dart:math' as math;
2 | import 'package:flutter/material.dart';
3 |
4 | class CustomSliverAppBarDelegate extends SliverPersistentHeaderDelegate {
5 | CustomSliverAppBarDelegate({
6 | @required this.minHeight,
7 | @required this.maxHeight,
8 | @required this.child,
9 | });
10 |
11 | final double minHeight;
12 | final double maxHeight;
13 | final Widget child;
14 |
15 | @override
16 | double get minExtent => minHeight;
17 |
18 | @override
19 | double get maxExtent => math.max(maxHeight, minHeight);
20 |
21 | @override
22 | Widget build(
23 | BuildContext context, double shrinkOffset, bool overlapsContent) {
24 | return SizedBox.expand(child: child);
25 | }
26 |
27 | @override
28 | bool shouldRebuild(CustomSliverAppBarDelegate oldDelegate) {
29 | return maxHeight != oldDelegate.maxHeight ||
30 | minHeight != oldDelegate.minHeight ||
31 | child != oldDelegate.child;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/lib/delegates/fallback_cupertino_localisations_delegate.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 |
3 | class FallbackCupertinoLocalisationsDelegate
4 | extends LocalizationsDelegate {
5 | const FallbackCupertinoLocalisationsDelegate();
6 |
7 | @override
8 | bool isSupported(Locale locale) => true;
9 |
10 | @override
11 | Future load(Locale locale) =>
12 | DefaultCupertinoLocalizations.load(locale);
13 |
14 | @override
15 | bool shouldReload(FallbackCupertinoLocalisationsDelegate old) => false;
16 | }
17 |
--------------------------------------------------------------------------------
/lib/delegates/sliver_appbar_delegate.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
4 | SliverAppBarDelegate(this._tabBar);
5 |
6 | final TabBar _tabBar;
7 |
8 | @override
9 | double get minExtent => _tabBar.preferredSize.height;
10 |
11 | @override
12 | double get maxExtent => _tabBar.preferredSize.height;
13 |
14 | @override
15 | Widget build(
16 | BuildContext context, double shrinkOffset, bool overlapsContent) {
17 | return Container(
18 | color: Colors.white,
19 | child: _tabBar,
20 | );
21 | }
22 |
23 | @override
24 | bool shouldRebuild(SliverAppBarDelegate oldDelegate) {
25 | return false;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/lib/enum/enum.dart:
--------------------------------------------------------------------------------
1 | enum ImageType { network, assets, localFile }
2 |
3 | enum LineType { vertical, horizontal }
4 |
5 | ///页面的模式
6 | enum LoginMode {
7 | ///登录账户
8 | LOGIN,
9 |
10 | ///注册账户
11 | REGIST
12 | }
13 |
14 | enum LoaderState { NoAction, Loading, Succeed, Failed, NoData }
15 |
16 | enum RefreshType { DEFAULT, LOAD_MORE, REFRESH }
17 |
18 | enum Rotation { LR, RL, TB, BT, TL2BR, BL2TR, TR2BL, BR2TL }
19 |
20 | enum Direction { LEFT, RIGHT, UP, DOWN }
21 |
22 | enum ButtonShape {
23 | NORMAL,
24 | // 圆角
25 | Fillet,
26 | // 方角
27 | SQUARE_CORNER,
28 | // 圆形
29 | CIRCLE,
30 | // 边框
31 | OUTLINE
32 | }
33 |
--------------------------------------------------------------------------------
/lib/global/config.dart:
--------------------------------------------------------------------------------
1 | class Config {
2 | static const bool DEBUG = true;
3 |
4 | /// 高德地图APP_KEY
5 | static const String AMAP_KEY_IOS = "24d68b20bd23ec522658ddd98d3cd5b0";
6 | static const String AMAP_KEY_ANDROID = "f9d17a113bace1ff32fed97166efcff3";
7 |
8 | /// 和天气APP_KEY
9 | static const String HE_WEATHER_KEY =
10 | // '2d2a76fac8324146a1b17b68bda42c76';
11 | "d6cfdce8193445ba894d889e7ab2de5b";
12 |
13 | static const String READER_IMAGE_URL = 'http://statics.zhuishushenqi.com';
14 | static const String READER_CHAPTER_URL =
15 | 'http://chapterup.zhuishushenqi.com/chapter/';
16 | }
17 |
--------------------------------------------------------------------------------
/lib/login/ui/submit_button.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class SubmitButton extends StatelessWidget {
4 | final String title;
5 | final VoidCallback onTap;
6 |
7 | SubmitButton({Key key, this.title, this.onTap}) : super(key: key);
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return GestureDetector(
12 | child: Container(
13 | padding: const EdgeInsets.only(
14 | left: 50.0, right: 50.0, top: 10.0, bottom: 10.0),
15 | decoration: BoxDecoration(
16 | borderRadius: BorderRadius.all(Radius.circular(15.0)),
17 | gradient: const LinearGradient(
18 | colors: const [const Color(0xFFfbab66), const Color(0xFFf7418c)],
19 | stops: const [0.0, 1.0],
20 | begin: Alignment.topCenter,
21 | end: Alignment.bottomCenter,
22 | )),
23 | child: Text(
24 | title,
25 | style: TextStyle(fontSize: 22.0, color: Colors.white),
26 | ),
27 | ),
28 | onTap: onTap,
29 | );
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/lib/movie/page/movie_classify_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_app/movie/ui/classify_section_view.dart';
3 |
4 | class MovieClassifyPage extends StatelessWidget {
5 | @override
6 | Widget build(BuildContext context) {
7 | return Scaffold(
8 | appBar: AppBar(
9 | centerTitle: true,
10 | title: Text('分类找电影'),
11 | ),
12 | body: ListView(
13 | children: [
14 | ClassifySectionView('类型'),
15 | ClassifySectionView('地区'),
16 | ClassifySectionView('年代'),
17 | ClassifySectionView('特色'),
18 | ],
19 | ),
20 | );
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/movie/page/movie_video.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:video_player/video_player.dart';
3 | import 'package:chewie/chewie.dart';
4 |
5 | class MovieVideoPage extends StatefulWidget {
6 | final String url;
7 |
8 | MovieVideoPage(this.url);
9 |
10 | @override
11 | createState() => _MovieVideoPageState();
12 | }
13 |
14 | class _MovieVideoPageState extends State {
15 | VideoPlayerController videoPlayerController;
16 | ChewieController chewieController;
17 |
18 | @override
19 | void initState() {
20 | super.initState();
21 |
22 | videoPlayerController = VideoPlayerController.network(this.widget.url);
23 | chewieController = ChewieController(
24 | videoPlayerController: videoPlayerController,
25 | aspectRatio: 16 / 9,
26 | autoPlay: true,
27 | looping: true,
28 | allowedScreenSleep: false,
29 | materialProgressColors: ChewieProgressColors(
30 | playedColor: Colors.red,
31 | handleColor: Colors.blue,
32 | backgroundColor: Colors.grey,
33 | bufferedColor: Colors.lightGreen),
34 | placeholder: Container(color: Colors.black),
35 | autoInitialize: true,
36 | );
37 | }
38 |
39 | @override
40 | void dispose() {
41 | videoPlayerController.dispose();
42 | chewieController.dispose();
43 | super.dispose();
44 | }
45 |
46 | @override
47 | Widget build(BuildContext context) {
48 | return Scaffold(
49 | backgroundColor: Colors.black,
50 | body: Container(child: Chewie(controller: chewieController)));
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/lib/movie/ui/classify_section_home.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../page_index.dart';
4 | import '../index.dart';
5 |
6 | class ClassifySection extends StatelessWidget {
7 | final String title;
8 | final List movies;
9 |
10 | ClassifySection(this.title, this.movies);
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return Column(children: [
15 | InkWell(
16 | onTap: () => pushNewPage(context, MovieTagListView(title)),
17 | child: Padding(
18 | padding: const EdgeInsets.all(8.0),
19 | child: Row(
20 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
21 | children: [Text(title), Icon(Icons.chevron_right)]),
22 | )),
23 | Container(
24 | padding: EdgeInsets.all(6.0),
25 | child: Wrap(
26 | spacing: 5,
27 | children: movies.length == 0
28 | ? []
29 | : movies.map((movie) => MovieGridView(movie)).toList(),
30 | ),
31 | )
32 | ]);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/lib/movie/ui/cover_section_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../page_index.dart';
4 |
5 | class CoverSectionView extends StatelessWidget {
6 | final Color backgroundColor;
7 | final String title;
8 | final double height;
9 | final int size;
10 | final Widget child;
11 | final VoidCallback onPressed;
12 | final bool hiddenMore;
13 |
14 | CoverSectionView(
15 | this.title, {
16 | Key key,
17 | this.backgroundColor,
18 | this.height,
19 | this.size,
20 | this.child,
21 | this.onPressed,
22 | this.hiddenMore = false,
23 | }) : super(key: key);
24 |
25 | @override
26 | Widget build(BuildContext context) {
27 | return Offstage(
28 | offstage: size == 0,
29 | child: Column(
30 | children: [
31 | SectionView("$title($size)",
32 | hiddenMore: hiddenMore,
33 | textColor: Colors.white,
34 | onPressed: onPressed,
35 | child: SizedBox.fromSize(
36 | size: Size.fromHeight(height),
37 | child: child,
38 | )),
39 | ],
40 | ),
41 | );
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/lib/movie/ui/item_cover.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../page_index.dart';
4 |
5 | class ItemCover extends StatelessWidget {
6 | final String url;
7 | final VoidCallback onTop;
8 | final bool offstage;
9 |
10 | ItemCover(
11 | this.url, {
12 | Key key,
13 | this.onTop,
14 | this.offstage = true,
15 | }) : super(key: key);
16 |
17 | @override
18 | Widget build(BuildContext context) {
19 | double width = (Utils.width - 5 * 4) / 2;
20 |
21 | return GestureDetector(
22 | child: Container(
23 | child: Stack(children: [
24 | ImageLoadView(url,
25 | width: double.infinity, height: double.infinity, radius: 5),
26 | Center(
27 | child: Offstage(
28 | offstage: offstage,
29 | child: Icon(Icons.play_arrow, color: Colors.white)))
30 | ]),
31 | width: width,
32 | padding: const EdgeInsets.all(5.0)),
33 | onTap: onTop,
34 | );
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/lib/movie/ui/item_grid_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../page_index.dart';
4 | import '../index.dart';
5 |
6 | class ItemGridView extends StatelessWidget {
7 | final List movies;
8 |
9 | ItemGridView({Key key, this.movies}) : super(key: key);
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | return GridView.builder(
14 | padding: EdgeInsets.all(6.0),
15 |
16 | /// 网格代理对象,一般使用SliverGridDelegateWithFixedCrossAxisCount对象创建,可指定crossAxisCount、mainAxisSpacing、crossAxisSpacing和childAspectRatio等值。
17 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
18 | /// 表示垂直于主轴方向上的单元格Widget数量。如果scrollDirection为Axis.vertical,则表示水平单元格的数量;如果scrollDirection为Axis.horizontal,则表示垂直单元格的数量。
19 | crossAxisCount: 3,
20 |
21 | /// 表示主轴方向单元格的间距。
22 | mainAxisSpacing: 5.0,
23 |
24 | /// 表示垂直于主轴方向的单元格间距。
25 | crossAxisSpacing: 5.0,
26 |
27 | /// 表示单元格的宽高比。
28 | childAspectRatio: 270 / 383,
29 | ),
30 | shrinkWrap: true,
31 | primary: false,
32 |
33 | /// 其值为一个函数:Widget Function(BuildContext context, int index),实现该函数用于创建每个网格对应的Widget。
34 | itemBuilder: (context, index) {
35 | return BouncingView(
36 | //点击事件
37 | onPressed: () => pushNewPage(context, MovieDetail(movies[index].id)),
38 | child: ImageLoadView(movies[index].images.medium.toString()),
39 | );
40 | },
41 |
42 | /// 表示网格的单元格总数。
43 | itemCount: movies.length,
44 | );
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/lib/movie/ui/item_photo.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_app/bean/movie.dart';
3 |
4 | class ItemPhoto extends StatelessWidget {
5 | final VoidCallback onTap;
6 | final Photos photo;
7 |
8 | ItemPhoto(this.photo, {Key key, this.onTap}) : super(key: key);
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | return GestureDetector(
13 | onTap: onTap,
14 | child: Card(
15 | child: Column(
16 | mainAxisSize: MainAxisSize.min,
17 | children: [
18 | Hero(
19 | tag: photo.id,
20 | child: Container(
21 | child: Image.network(
22 | photo.image,
23 | fit: BoxFit.fill,
24 | ),
25 | decoration: BoxDecoration(
26 | borderRadius: BorderRadius.only(
27 | topLeft: Radius.circular(5.0),
28 | topRight: Radius.circular(5.0))),
29 | )),
30 | Row(
31 | children: [
32 | Padding(
33 | padding: const EdgeInsets.all(5.0),
34 | child: CircleAvatar(
35 | radius: 15,
36 | backgroundImage: NetworkImage(photo.author.avatar),
37 | ),
38 | ),
39 | Text(photo.author.name),
40 | ],
41 | ),
42 | ],
43 | ),
44 | ),
45 | );
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/lib/movie/ui/movie_detail_header.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_app/bean/movie.dart';
3 | import 'package:flutter_app/ui/image_load_view.dart';
4 |
5 | class MovieDetailHeader extends StatelessWidget {
6 | final Movie movie;
7 | final Color pageColor;
8 |
9 | MovieDetailHeader(this.movie, {Key key, this.pageColor}) : super(key: key);
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | String defaultImage =
14 | 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3271389503,231131796&fm=26&gp=0.jpg';
15 |
16 | return SliverAppBar(
17 | pinned: true,
18 | expandedHeight: 200,
19 | backgroundColor: pageColor,
20 | actions: [
21 | IconButton(icon: Icon(Icons.favorite_border), onPressed: () {})
22 | ],
23 | flexibleSpace: FlexibleSpaceBar(
24 | title: Text('${movie.title}(${movie.year})'),
25 | centerTitle: true,
26 | background: ImageLoadView(
27 | movie.photos.length > 0
28 | ? movie?.photos?.first?.image
29 | : defaultImage,
30 | fit: BoxFit.fitWidth,
31 | sigmaX: 5.0,
32 | sigmaY: 6.0,
33 | opacity: 0.4,
34 | filterColor: pageColor,
35 | child: ImageLoadView(movie.images.large.toString(),
36 | height: 191.5, width: 135.0))));
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/lib/movie/ui/movie_grid_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../page_index.dart';
4 | import '../index.dart';
5 |
6 | class MovieGridView extends StatelessWidget {
7 | final Movie movie;
8 | final Color textColor;
9 |
10 | MovieGridView(this.movie, {Key key, this.textColor = Colors.black})
11 | : super(key: key);
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | double width = (Utils.width - 6 * 2 - 5 * 2) / 3;
16 | double height = width * 383 / 270;
17 |
18 | return BouncingView(
19 | child: Container(
20 | width: width,
21 | child: Column(
22 | crossAxisAlignment: CrossAxisAlignment.start,
23 | children: [
24 | ImageLoadView(movie.images.medium.toString(),
25 | fit: BoxFit.cover, height: height),
26 | SizedBox(height: 5),
27 | Text(movie.title,
28 | overflow: TextOverflow.ellipsis,
29 | style: TextStyle(
30 | fontSize: 14,
31 | fontWeight: FontWeight.bold,
32 | color: textColor),
33 | maxLines: 1),
34 | SizedBox(height: 3),
35 | SmoothStarRating(
36 | rating: movie.rating.average / 2.0,
37 | size: 18,
38 | allowHalfRating: false,
39 | color: Colors.deepOrange)
40 | ])),
41 | onPressed: () => pushNewPage(context, MovieDetail(movie.id)),
42 | );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/lib/movie/ui/person_gridview.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../page_index.dart';
4 |
5 | class PersonGridView extends StatelessWidget {
6 | final Casts casts;
7 | final Color textColor;
8 | final VoidCallback onTap;
9 |
10 | PersonGridView(
11 | {Key key, this.casts, this.textColor = Colors.grey, this.onTap})
12 | : assert(textColor != null),
13 | super(key: key);
14 |
15 | @override
16 | Widget build(BuildContext context) {
17 | return Container(
18 | width: 90.0,
19 | child: Column(children: [
20 | GestureDetector(
21 | //点击事件
22 | onTap: onTap,
23 | child: CircleAvatar(
24 | backgroundImage:
25 | NetworkImage(casts?.avatars?.small ?? douBanDefaultImage),
26 | radius: 40.0)),
27 | Text(casts.name,
28 | maxLines: 1,
29 | textAlign: TextAlign.center,
30 | overflow: TextOverflow.ellipsis,
31 | style: TextStyle(color: textColor))
32 | ]));
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/lib/movie/ui/person_scroller.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_app/utils/route_util.dart';
3 |
4 | import '../index.dart';
5 |
6 | class PersonScroller extends StatelessWidget {
7 | final List casts;
8 |
9 | PersonScroller({Key key, @required this.casts})
10 | : assert(casts != null),
11 | super(key: key);
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | return Container(
16 | height: 120.0,
17 | padding:
18 | const EdgeInsets.only(top: 10, left: 5.0, right: 5.0, bottom: 0.0),
19 | child: ListView.builder(
20 | padding: EdgeInsets.zero,
21 | scrollDirection: Axis.horizontal,
22 | itemCount: casts.length,
23 | itemBuilder: (context, index) => PersonGridView(
24 | casts: casts[index],
25 | textColor: Colors.white,
26 | onTap: () {
27 | if (casts[index].id != null)
28 | pushNewPage(
29 | context,
30 | MovieCelebrityPage(
31 | id: casts[index].id, name: casts[index].name));
32 | })));
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/lib/movie/ui/star_rate.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../page_index.dart';
4 |
5 | class StarRate extends StatelessWidget {
6 | final double rating;
7 | final int starCount;
8 | final double rate;
9 | final Color starColor;
10 | final double width;
11 |
12 | StarRate(
13 | {Key key,
14 | this.rating,
15 | this.starCount,
16 | this.rate,
17 | this.starColor: Colors.blueGrey,
18 | this.width: 100})
19 | : super(key: key);
20 |
21 | @override
22 | Widget build(BuildContext context) {
23 | return Row(
24 | children: [
25 | SmoothStarRating(
26 | rating: rating, starCount: starCount, size: 12, color: starColor),
27 | Gaps.hGap8,
28 | Container(
29 | width: width,
30 | child: LinearProgressIndicator(
31 | backgroundColor: Colors.grey,
32 | value: rate,
33 | valueColor: AlwaysStoppedAnimation(Colors.red)),
34 | )
35 | ],
36 | mainAxisAlignment: MainAxisAlignment.end,
37 | );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/lib/music_player/index.dart:
--------------------------------------------------------------------------------
1 | export 'music_player.dart';
2 | export 'audioplayers.dart';
3 | export 'flutter_sound.dart';
4 |
5 | export 'widgets/album_cover.dart';
6 | export 'widgets/cd_view.dart';
7 | export 'widgets/item_rank_grid.dart';
8 | export 'widgets/item_rank_list.dart';
9 | export 'widgets/item_songlist_category.dart';
10 | export 'widgets/item_songlist_info.dart';
11 | export 'widgets/item_top_song.dart';
12 | export 'widgets/radial_seek_bar.dart';
13 | export 'widgets/song_player_bar.dart';
14 |
15 | export 'top/list.dart';
16 | export 'top/songs.dart';
17 |
18 | export 'song_list/category.dart';
19 | export 'song_list/details.dart';
20 |
21 | export 'package:flutter_app/bean/music.dart';
22 |
--------------------------------------------------------------------------------
/lib/mvp/data/crypto_repository_impl.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import '../../page_index.dart';
4 | import 'crypto.dart';
5 |
6 | class ProdCryptoRepository implements CryptoRepository {
7 | @override
8 | Future> fetchCurrencies() async {
9 | Response response =
10 | await HttpUtils(baseUrl: 'https://api.coinmarketcap.com')
11 | .request('/v1/ticker', data: {"limit": 50});
12 |
13 | final List responseBody = json.decode(response.data);
14 | final statusCode = response.statusCode;
15 | if (statusCode != 200 || responseBody == null) {
16 | throw FetchDataException(
17 | "An error ocurred : [Status Code : $statusCode]");
18 | }
19 |
20 | return responseBody.map((c) => Crypto.fromMap(c)).toList();
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/mvp/modules/crypto_list_presenter.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_app/mvp/data/crypto.dart';
2 | import 'package:flutter_app/mvp/data/crypto_repository_impl.dart';
3 |
4 | abstract class CryptoListViewContract {
5 | void onLoadCryptoComplete(List items);
6 |
7 | void onLoadCryptoError();
8 | }
9 |
10 | abstract class CryptoPresenterContract {
11 | void loadCurrencies();
12 | }
13 |
14 | class CryptoListPresenter implements CryptoPresenterContract {
15 | CryptoListViewContract _view;
16 | CryptoRepository _repository;
17 |
18 | CryptoListPresenter(this._view) {
19 | _repository = ProdCryptoRepository();
20 | }
21 |
22 | @override
23 | void loadCurrencies() {
24 | assert(_view != null);
25 | _repository
26 | .fetchCurrencies()
27 | .then((c) => _view.onLoadCryptoComplete(c))
28 | .catchError((onError) => _view.onLoadCryptoError());
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/nba/home/team_data_rank/list.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_app/nba/widgets/item_team_data_rank.dart';
3 |
4 | import '../../../page_index.dart';
5 |
6 | class TeamDataRankListPage extends StatefulWidget {
7 | final List list;
8 |
9 | TeamDataRankListPage({Key key, this.list}) : super(key: key);
10 |
11 | @override
12 | createState() => _TeamDataRankListPageState();
13 | }
14 |
15 | class _TeamDataRankListPageState extends State
16 | with AutomaticKeepAliveClientMixin {
17 | LoaderState state = LoaderState.NoAction;
18 |
19 | List list = [];
20 |
21 | @override
22 | void initState() {
23 | super.initState();
24 |
25 | list.addAll(widget.list);
26 | }
27 |
28 | @override
29 | void dispose() {
30 | super.dispose();
31 | }
32 |
33 | @override
34 | Widget build(BuildContext context) {
35 | super.build(context);
36 | return LoaderContainer(
37 | contentView: ListView.builder(
38 | itemBuilder: (_, index) =>
39 | ItemTeamDataRank(item: list[index], rank: index + 1),
40 | itemCount: list.length,
41 | ),
42 | loaderState: state);
43 | }
44 |
45 | @override
46 | bool get wantKeepAlive => true;
47 | }
48 |
--------------------------------------------------------------------------------
/lib/nba/match/widgets/item_match_player_stats.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../index.dart';
4 |
5 | class ItemMatchPlayerStatsView extends StatelessWidget {
6 | final List data;
7 |
8 | ItemMatchPlayerStatsView({Key key, @required this.data}) : super(key: key);
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | return Container(
13 | height: data.length * 40.0,
14 | width: 650.0,
15 | child: Table(
16 | children: data.map((item) {
17 | int index = data.indexOf(item);
18 | return TableRow(
19 | decoration:
20 | BoxDecoration(color: index < 5 ? Colors.grey[300] : Colors.white),
21 | children: [
22 | ItemCellView(title: '${index < 5 ? "是" : "否"}'),
23 | ItemCellView(title: '${item?.row[2]}'),
24 | ItemCellView(title: '${item?.row[3]}'),
25 | ItemCellView(title: '${item?.row[4]}'),
26 | ItemCellView(title: '${item?.row[5]}'),
27 | ItemCellView(title: '${item?.row[6]}'),
28 | ItemCellView(title: '${item?.row[7]}'),
29 | ItemCellView(title: '${item?.row[8]}'),
30 | ItemCellView(title: '${item?.row[9]}'),
31 | ItemCellView(title: '${item?.row[10]}'),
32 | ItemCellView(title: '${item?.row[11]}'),
33 | ItemCellView(title: '${item?.row[12]}'),
34 | ItemCellView(title: '${item?.row[13]}'),
35 | ],
36 | );
37 | }).toList()),
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/lib/nba/match/widgets/item_match_player_stats_left.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../index.dart';
4 |
5 | class ItemMatchPlayerStatsLeftView extends StatelessWidget {
6 | final String playerNo;
7 | final String playerName;
8 | final Color bgColor;
9 | final Color textColor;
10 |
11 | ItemMatchPlayerStatsLeftView(
12 | {Key key,
13 | @required this.playerName,
14 | this.playerNo,
15 | this.bgColor,
16 | this.textColor})
17 | : super(key: key);
18 |
19 | @override
20 | Widget build(BuildContext context) {
21 | return Container(
22 | color: bgColor,
23 | child: Row(
24 | children: [
25 | ItemCellView(title: '$playerNo', textColor: textColor),
26 | Expanded(
27 | child: Container(
28 | height: 40,
29 | alignment: Alignment.centerLeft,
30 | child: Text(
31 | '$playerName',
32 | maxLines: 1,
33 | overflow: TextOverflow.ellipsis,
34 | style: TextStyle(color: textColor ?? Colors.black),
35 | ),
36 | ),
37 | ),
38 | ],
39 | ),
40 | );
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/lib/nba/match/widgets/match_player_stats_title.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../index.dart';
4 |
5 | class TitleWidget extends StatelessWidget {
6 | const TitleWidget({Key key}) : super(key: key);
7 |
8 | @override
9 | Widget build(BuildContext context) {
10 | return Row(children: [
11 | ItemCellView(title: '首发', textColor: Colors.white),
12 | ItemCellView(title: '时间', textColor: Colors.white),
13 | ItemCellView(title: '得分', textColor: Colors.white),
14 | ItemCellView(title: '篮板', textColor: Colors.white),
15 | ItemCellView(title: '助攻', textColor: Colors.white),
16 | ItemCellView(title: '投篮', textColor: Colors.white),
17 | ItemCellView(title: '三分', textColor: Colors.white),
18 | ItemCellView(title: '罚球', textColor: Colors.white),
19 | ItemCellView(title: '抢断', textColor: Colors.white),
20 | ItemCellView(title: '盖帽', textColor: Colors.white),
21 | ItemCellView(title: '失误', textColor: Colors.white),
22 | ItemCellView(title: '犯规', textColor: Colors.white),
23 | ItemCellView(title: '+/-', textColor: Colors.white)
24 | ]);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/lib/nba/widgets/item_bar_chart.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class ItemBarChartView extends StatelessWidget {
4 | final String title;
5 | final double max;
6 | final double value;
7 | final double avg;
8 | final Color teamColor;
9 |
10 | ItemBarChartView(
11 | {Key key, this.title, this.value, this.max, this.avg, this.teamColor})
12 | : super(key: key);
13 |
14 | @override
15 | Widget build(BuildContext context) {
16 | return GestureDetector(
17 | child: Container(
18 | child: Column(
19 | children: [
20 | Row(
21 | crossAxisAlignment: CrossAxisAlignment.end,
22 | children: [
23 | Container(
24 | color: teamColor ?? Colors.deepPurple,
25 | width: 10,
26 | height: 120 * value / max,
27 | ),
28 | Container(
29 | color: Colors.purpleAccent,
30 | width: 10,
31 | height: 120,
32 | ),
33 | Container(
34 | color: Colors.lightBlue,
35 | width: 10,
36 | height: 120 * avg / max,
37 | ),
38 | ],
39 | mainAxisSize: MainAxisSize.min,
40 | ),
41 | Text('$title')
42 | ],
43 | ),
44 | ),
45 | onTap: () {},
46 | );
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/lib/nba/widgets/item_cell.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class ItemCellView extends StatelessWidget {
4 | final double width;
5 | final double height;
6 | final String title;
7 | final Color textColor;
8 |
9 | ItemCellView(
10 | {Key key,
11 | @required this.title,
12 | this.height: 40.0,
13 | this.width: 50.0,
14 | this.textColor})
15 | : super(key: key);
16 |
17 | @override
18 | Widget build(BuildContext context) {
19 | return Container(
20 | width: width,
21 | height: height,
22 | child: Text(
23 | '$title',
24 | style: TextStyle(color: textColor ?? Colors.black),
25 | ),
26 | alignment: Alignment.center,
27 | );
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/nba/widgets/player_career_title.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../index.dart';
4 |
5 | class PlayerCareerTitle extends StatelessWidget {
6 | PlayerCareerTitle({Key key}) : super(key: key);
7 |
8 | @override
9 | Widget build(BuildContext context) {
10 | return Container(
11 | child: Row(
12 | children: [
13 | ItemCellView(title: '赛季', width: 150),
14 | ItemCellView(width: 80, title: '球队'),
15 | // 上场时间(分钟)
16 | ItemCellView(width: 70, title: '时间'),
17 | // 得分
18 | ItemCellView(title: '得分'),
19 | // 命中数 - 出手数
20 | ItemCellView(width: 80, title: '投篮'),
21 | // 命中率
22 | ItemCellView(width: 60, title: '命中率'),
23 | // 三分命中数 - 三分出手数
24 | ItemCellView(width: 80, title: '三分球'),
25 | // 三分命中率
26 | ItemCellView(width: 60, title: '三分%'),
27 | // 罚球命中数 - 罚球数
28 | ItemCellView(width: 80, title: '罚球'),
29 | // 罚球命中率
30 | ItemCellView(width: 60, title: '罚球%'),
31 | // 助攻
32 | ItemCellView(title: '助攻'),
33 | // 篮板
34 | ItemCellView(title: '篮板'),
35 | // 前场篮板
36 | ItemCellView(title: '前场板', width: 60.0),
37 | // 后场篮板
38 | ItemCellView(title: '后场板', width: 60.0),
39 | // 抢断
40 | ItemCellView(title: '抢断'),
41 | // 盖帽
42 | ItemCellView(title: '盖帽'),
43 | // 犯规
44 | ItemCellView(title: '犯规')
45 | ],
46 | ),
47 | );
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/lib/page/loading_json.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:flutter/services.dart';
4 | import 'package:flutter/material.dart';
5 |
6 | class LoadingJsonPage extends StatefulWidget {
7 | LoadingJsonPage({Key key}) : super(key: key);
8 |
9 | @override
10 | createState() => _LoadingJsonPageState();
11 | }
12 |
13 | class _LoadingJsonPageState extends State {
14 | String txt = '';
15 |
16 | @override
17 | void initState() {
18 | super.initState();
19 |
20 | getJsonData();
21 | }
22 |
23 | @override
24 | Widget build(BuildContext context) {
25 | return Scaffold(
26 | appBar: AppBar(
27 | centerTitle: true,
28 | title: Text('Read Assets Json File'),
29 | ),
30 | body: SingleChildScrollView(
31 | child: Padding(
32 | padding: EdgeInsets.all(10.0),
33 | child: Text('$txt'),
34 | ),
35 | ),
36 | );
37 | }
38 |
39 | void getJsonData() async {
40 | rootBundle.loadString('assets/data/elements.json').then((value) {
41 | List list = json.decode(value);
42 |
43 | setState(() {
44 | txt = list.toString();
45 | });
46 | });
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/lib/page/login6/component/iconbutton.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_app/utils/utils.dart';
3 |
4 | import 'on_boarding_enter_animation.dart';
5 |
6 | class CircleIconButton extends StatelessWidget {
7 | const CircleIconButton(
8 | {Key key,
9 | @required this.onBoardingEnterAnimation,
10 | this.animatedValue,
11 | this.icon,
12 | this.color,
13 | this.onPressed,
14 | @required this.tag})
15 | : assert(tag != null),
16 | super(key: key);
17 |
18 | final OnBoardingEnterAnimation onBoardingEnterAnimation;
19 | final double animatedValue;
20 | final IconData icon;
21 | final Color color;
22 | final Function onPressed;
23 | final String tag;
24 |
25 | @override
26 | Widget build(BuildContext context) {
27 | return FadeTransition(
28 | opacity: onBoardingEnterAnimation.fadeTranslation,
29 | child: Transform(
30 | alignment: Alignment.center,
31 | transform:
32 | Matrix4.translationValues(animatedValue * Utils.height, 0, 0.0),
33 | child: FloatingActionButton(
34 | heroTag: tag,
35 | child: Icon(
36 | icon,
37 | color: Colors.white,
38 | ),
39 | onPressed: onPressed,
40 | backgroundColor: color,
41 | ),
42 | ),
43 | );
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/lib/page/login6/component/on_boarding_enter_animation.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class OnBoardingEnterAnimation {
4 | OnBoardingEnterAnimation(this.controller)
5 | : scaleTranslation = Tween(begin: 0.0, end: 1.0).animate(
6 | CurvedAnimation(
7 | parent: controller,
8 | curve: Interval(
9 | 0.0,
10 | 0.5,
11 | curve: Curves.fastOutSlowIn,
12 | ),
13 | ),
14 | ),
15 | fadeTranslation = Tween(begin: 0.0, end: 1.0).animate(
16 | CurvedAnimation(
17 | parent: controller,
18 | curve: Interval(
19 | 0.5,
20 | 1,
21 | curve: Curves.fastOutSlowIn,
22 | ),
23 | ),
24 | );
25 |
26 | final AnimationController controller;
27 | final Animation scaleTranslation;
28 | final Animation fadeTranslation;
29 | }
30 |
--------------------------------------------------------------------------------
/lib/page/login6/component/trapezoid_down_cut.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class TrapezoidDownCut extends StatelessWidget {
4 | TrapezoidDownCut({@required this.child});
5 |
6 | final Widget child;
7 |
8 | @override
9 | Widget build(BuildContext context) {
10 | return ClipPath(
11 | clipper: DiagonalClipper(),
12 | child: child,
13 | );
14 | }
15 | }
16 |
17 | class DiagonalClipper extends CustomClipper {
18 | @override
19 | Path getClip(Size size) {
20 | var path = Path();
21 | path.lineTo(0.0, size.height * 0.7);
22 | path.quadraticBezierTo(
23 | 0.0, size.height * 0.7 + 14, 15, size.height * 0.7 + 20);
24 |
25 | path.lineTo(size.width - 50, size.height - 15);
26 | path.quadraticBezierTo(
27 | size.width, size.height, size.width, size.height - 50);
28 |
29 | path.lineTo(size.width, size.height * 0.1);
30 | path.quadraticBezierTo(size.width, 0.0, size.width * 0.9, 0.0);
31 |
32 | path.lineTo(size.width * 0.1, 0.0);
33 | path.quadraticBezierTo(0.0, 0.0, 0.0, size.height * 0.1);
34 |
35 | return path;
36 | }
37 |
38 | @override
39 | bool shouldReclip(CustomClipper oldClipper) => false;
40 | }
41 |
--------------------------------------------------------------------------------
/lib/page/login6/component/trapezoid_up_cut.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class TrapezoidUpCut extends StatelessWidget {
4 | TrapezoidUpCut({@required this.child});
5 |
6 | final Widget child;
7 |
8 | @override
9 | Widget build(BuildContext context) {
10 | return new ClipPath(
11 | clipper: new DiagonalClipper(),
12 | child: child,
13 | );
14 | }
15 | }
16 |
17 | class DiagonalClipper extends CustomClipper {
18 | @override
19 | Path getClip(Size size) {
20 | var path = new Path();
21 | path.lineTo(0.0, size.height * 0.9);
22 | path.quadraticBezierTo(0.0, size.height, size.width * 0.1, size.height);
23 |
24 | path.lineTo(size.width * 0.9, size.height);
25 | path.quadraticBezierTo(
26 | size.width, size.height, size.width, size.height * 0.9);
27 |
28 | path.lineTo(size.width, size.height * 0.3);
29 | path.quadraticBezierTo(size.width, size.height * 0.3 - 20, size.width - 20,
30 | size.height * 0.3 - 27);
31 |
32 | path.lineTo(50.0, 15.0);
33 | path.quadraticBezierTo(0.0, 0.0, 0.0, 50.0);
34 | return path;
35 | }
36 |
37 | @override
38 | bool shouldReclip(CustomClipper oldClipper) => false;
39 | }
40 |
--------------------------------------------------------------------------------
/lib/page/pages.dart:
--------------------------------------------------------------------------------
1 | export 'backdrop.dart';
2 | export 'bottom_drag.dart';
3 | export 'card_flip_page.dart';
4 | export 'clippy_widget.dart';
5 | export 'device_info_page.dart';
6 | export 'drag_sort_page.dart';
7 | export 'dropdown_menu_sample.dart';
8 | export 'elements.dart';
9 | export 'flip_view_custom.dart';
10 | export 'flipper_widget.dart';
11 | export 'flutter_flip_view_sample.dart';
12 | export 'horizontal_picker_demo.dart';
13 | export 'inner_drawer.dart';
14 | export 'like_button_page.dart';
15 | export 'loading_json.dart';
16 | export 'login/login_page.dart';
17 | export 'login4/signup.dart';
18 | export 'login6/index.dart';
19 | export 'login_video_page.dart';
20 | export 'mine_page.dart';
21 | export 'nine_grid_page.dart';
22 | export 'palette_generator_sample.dart';
23 | export 'parallax_image.dart';
24 | export 'random_words.dart';
25 | export 'route_sample.dart';
26 | export 'ruler_sample.dart';
27 | export 'second_floor.dart';
28 | export 'setting.dart';
29 | export 'shimmer.dart';
30 | export 'slide_menu_item_demo.dart';
31 | export 'sound_demo.dart';
32 | export 'swiper_sample.dart';
33 | export 'table_sample.dart';
34 | export 'theme_sample.dart';
35 | export 'time_line.dart';
36 | export 'wave_sample.dart';
37 |
--------------------------------------------------------------------------------
/lib/qdaily/ui/banner_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../page_index.dart';
4 | import '../index.dart';
5 |
6 | class BannerView extends StatelessWidget {
7 | final List banners;
8 |
9 | BannerView({Key key, @required this.banners}) : super(key: key);
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | return AspectRatio(
14 | aspectRatio: 32 / 19,
15 | child: Swiper(
16 | itemBuilder: (BuildContext context, int index) => InkWell(
17 | onTap: () => pushNewPage(
18 | context, ArticleDetail(id: banners[index]?.post?.id)),
19 | child: Stack(
20 | alignment: Alignment.bottomLeft,
21 | children: [
22 | ImageLoadView(banners[index]?.image),
23 | Container(
24 | width: double.infinity,
25 | color: Color(0x2b000000),
26 | child: Text('${banners[index]?.post?.title}',
27 | style:
28 | TextStyle(color: Colors.white, fontSize: 22)),
29 | padding: EdgeInsets.only(left: 20, bottom: 30))
30 | ],
31 | ),
32 | ),
33 | itemCount: banners.length,
34 | pagination: SwiperPagination()),
35 | );
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/lib/qdaily/ui/bottom_appbar.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_app/utils/utils.dart';
3 |
4 | class BottomAppbar extends StatelessWidget {
5 | final Color backgroundColor;
6 | final List actions;
7 | final Widget title;
8 |
9 | BottomAppbar(
10 | {Key key, this.backgroundColor = Colors.white, this.actions, this.title})
11 | : super(key: key);
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | return Material(
16 | elevation: 16,
17 | color: backgroundColor,
18 | child: Container(
19 | height: Utils.navigationBarHeight -
20 | Utils.topSafeHeight +
21 | Utils.bottomSafeHeight,
22 | child: Row(
23 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
24 | children: [
25 | BackButton(),
26 | Row(
27 | mainAxisSize: MainAxisSize.min,
28 | children: actions.isEmpty ? [] : actions)
29 | ]),
30 | padding: EdgeInsets.only(bottom: Utils.bottomSafeHeight),
31 | ),
32 | );
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/lib/qdaily/ui/choice_no_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../page_index.dart';
4 |
5 | class ChoiceNoView extends StatelessWidget {
6 | final int index;
7 | final int total;
8 | final EdgeInsetsGeometry padding;
9 |
10 | ChoiceNoView({
11 | Key key,
12 | @required this.index,
13 | @required this.total,
14 | this.padding,
15 | }) : super(key: key);
16 |
17 | @override
18 | Widget build(BuildContext context) {
19 | return Container(
20 | padding: padding ??
21 | EdgeInsets.only(top: Utils.topSafeHeight + 10, bottom: 20),
22 | child: LineViewLine(
23 | horizontalPadding: 30,
24 | child: CircleAvatar(
25 | radius: 30,
26 | backgroundColor: Colors.yellow,
27 | child: Text('$index / $total'))));
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/qdaily/ui/column_author_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../page_index.dart';
4 |
5 | class ColumnAuthorView extends StatelessWidget {
6 | final AuthorBean author;
7 |
8 | ColumnAuthorView({Key key, @required this.author}) : super(key: key);
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | return Container(
13 | margin: EdgeInsets.only(top: 10),
14 | child: Card(
15 | child: Container(
16 | padding: EdgeInsets.symmetric(horizontal: 10, vertical: 3),
17 | child: Row(children: [
18 | ImageLoadView('${author.avatar}',
19 | shape: BoxShape.circle,
20 | width: 50,
21 | height: 50),
22 | Gaps.hGap5,
23 | Expanded(
24 | child: Column(
25 | crossAxisAlignment: CrossAxisAlignment.start,
26 | children: [
27 | Text('${author.name}',
28 | style: TextStyle(
29 | color: Colors.black,
30 | fontSize: 20,
31 | fontWeight: FontWeight.bold)),
32 | Text('${author.description}',
33 | maxLines: 2,
34 | overflow: TextOverflow.ellipsis,
35 | style: TextStyle(color: Colors.grey))
36 | ]))
37 | ])),
38 | ));
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/lib/qdaily/ui/item_bottom_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_app/bean/qdaily.dart';
3 |
4 | class ItemBottomView extends StatelessWidget {
5 | final PostBean post;
6 |
7 | ItemBottomView({Key key, @required this.post}) : super(key: key);
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return Container(
12 | child: Row(children: [
13 | Text('${post?.category?.title}',
14 | style: TextStyle(color: Colors.grey, fontSize: 12)),
15 | SizedBox(width: 5),
16 | Image.asset('images/qdaily/icon_toolbar_comment.png',
17 | width: 15, height: 15, color: Colors.grey),
18 | Text('${post?.commentCount}',
19 | style: TextStyle(color: Colors.grey, fontSize: 12)),
20 | SizedBox(width: 5),
21 | Image.asset('images/qdaily/icon_toolbar_like_unpressed.png',
22 | width: 15, height: 15, color: Colors.grey),
23 | Text('${post?.praiseCount}',
24 | style: TextStyle(color: Colors.grey, fontSize: 12)),
25 | Spacer(),
26 | Text("${post?.publishTime}",
27 | style: TextStyle(color: Colors.grey, fontSize: 12))
28 | ]),
29 | );
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/lib/qdaily/ui/item_option_checkbox.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_app/ui/image_load_view.dart';
3 |
4 | import '../index.dart';
5 |
6 | class ItemOptionCheckbox extends StatefulWidget {
7 | final Option option;
8 | final Function onChecked;
9 | final bool isChecked;
10 |
11 | ItemOptionCheckbox(
12 | {Key key, @required this.option, this.onChecked, this.isChecked: false})
13 | : super(key: key);
14 |
15 | @override
16 | createState() => _ItemOptionCheckboxState();
17 | }
18 |
19 | class _ItemOptionCheckboxState extends State {
20 | @override
21 | Widget build(BuildContext context) {
22 | return Material(
23 | child: InkWell(
24 | onTap: () => setState(() => widget.onChecked(!widget.isChecked)),
25 | child: Container(
26 | child: Row(
27 | children: [
28 | ImageLoadView('${widget.option?.image}',
29 | width: 90, height: 90),
30 | SizedBox(width: 10),
31 | Expanded(child: Text('${widget.option?.content}')),
32 | Checkbox(
33 | value: widget.isChecked,
34 | onChanged: (checked) =>
35 | setState(() => widget.onChecked(checked)))
36 | ],
37 | ),
38 | ),
39 | ),
40 | color: Colors.white);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/lib/qdaily/ui/item_option_image.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../page_index.dart';
4 | import '../index.dart';
5 |
6 | class ItemOptionImage extends StatelessWidget {
7 | final Option option;
8 |
9 | ItemOptionImage({Key key, @required this.option}) : super(key: key);
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | double width = Utils.width;
14 |
15 | return Container(
16 | color: Utils.randomRGB(),
17 | child: Column(children: [
18 | Stack(children: [
19 | ImageLoadView('${option?.image}',
20 | width: (width - 14) / 2, height: (width - 14) / 2),
21 | Padding(
22 | padding: EdgeInsets.all(10),
23 | child: ViewOptionAuthor(
24 | avatar: '${option?.author?.avatar}',
25 | name: '${option?.author?.name}'))
26 | ]),
27 | Container(
28 | padding: EdgeInsets.only(top: 5, left: 10, right: 10, bottom: 10),
29 | child: Column(children: [
30 | Text('${option.content}',
31 | textAlign: TextAlign.center,
32 | style: TextStyle(
33 | color: Colors.white,
34 | fontSize: option.content.length > 8 ? 14 : 18)),
35 | SizedBox(height: 5),
36 | ViewOptionBottom(praiseCount: option.praiseCount)
37 | ]))
38 | ]));
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/lib/qdaily/ui/item_option_text.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_app/utils/utils.dart';
3 |
4 | import '../index.dart';
5 |
6 | class ItemOptionText extends StatelessWidget {
7 | final Option option;
8 |
9 | ItemOptionText({Key key, @required this.option}) : super(key: key);
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | return Material(
14 | color: Utils.randomRGB(),
15 | child: Container(
16 | padding: EdgeInsets.all(10),
17 | child: Column(children: [
18 | ViewOptionAuthor(
19 | avatar: '${option?.author?.avatar}',
20 | name: '${option?.author?.name}'),
21 | ConstrainedBox(
22 | child: Container(
23 | padding: EdgeInsets.symmetric(vertical: 10),
24 | child: Text('${option.content}',
25 | textAlign: TextAlign.center,
26 | style: TextStyle(
27 | color: Colors.white,
28 | fontSize: option.content.length > 8 ? 14 : 18)),
29 | alignment: Alignment.center),
30 | constraints: BoxConstraints(minHeight: 80)),
31 | ViewOptionBottom(praiseCount: option.praiseCount)
32 | ])),
33 | );
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/lib/qdaily/ui/item_top_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../page_index.dart';
4 |
5 | class ItemTopView extends StatelessWidget {
6 | final String icon;
7 | final String title;
8 | final VoidCallback onPressed;
9 |
10 | ItemTopView({Key key, this.icon, this.title, this.onPressed})
11 | : super(key: key);
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | return Material(
16 | color: Colors.white,
17 | child: Container(
18 | child: Row(children: [
19 | ImageLoadView('$icon',
20 | height: 25, width: 25, shape: BoxShape.circle),
21 | Gaps.hGap8,
22 | Text('$title'),
23 | Spacer(),
24 | IconButton(icon: Icon(Feather.share), onPressed: onPressed)
25 | ]),
26 | padding: EdgeInsets.only(left: 15, right: 10)),
27 | );
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/qdaily/ui/item_vote_options.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_app/res/styles.dart';
3 |
4 | import '../index.dart';
5 |
6 | class ItemVoteOptions extends StatelessWidget {
7 | final Option option;
8 |
9 | ItemVoteOptions({Key key, this.option}) : super(key: key);
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | return Container(
14 | color: Colors.white,
15 | child: Row(children: [
16 | Padding(
17 | padding: const EdgeInsets.all(8.0),
18 | child: CustomPaint(
19 | painter: ArcPainter(
20 | isCheck: option.selected, rate: option.percent.toDouble()),
21 | size: Size(50, 50))),
22 | Expanded(
23 | child: Column(
24 | crossAxisAlignment: CrossAxisAlignment.start,
25 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
26 | children: [
27 | Text(
28 | '${option.percent}%',
29 | style: TextStyles.textDark16,
30 | ),
31 | Text(
32 | '${option.content}',
33 | style: TextStyles.textGrey14,
34 | )
35 | ]))
36 | ]),
37 | );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/lib/qdaily/ui/view_option_author.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../page_index.dart';
4 |
5 | class ViewOptionAuthor extends StatelessWidget {
6 | final String avatar;
7 | final String name;
8 |
9 | ViewOptionAuthor({Key key, this.name, this.avatar}) : super(key: key);
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | return Row(children: [
14 | ImageLoadView('$avatar', width: 20, height: 20, shape: BoxShape.circle),
15 | Gaps.hGap8,
16 | Expanded(
17 | child: Text('$name',
18 | maxLines: 1,
19 | overflow: TextOverflow.ellipsis,
20 | style: TextStyle(color: Colors.white)))
21 | ]);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/qdaily/ui/view_option_bottom.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_vector_icons/flutter_vector_icons.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class ViewOptionBottom extends StatelessWidget {
5 | final int id;
6 | final int praiseCount;
7 |
8 | ViewOptionBottom({Key key, this.id, this.praiseCount}) : super(key: key);
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | return Row(children: [
13 | Icon(Icons.favorite_border, color: Colors.white, size: 20),
14 | Text('$praiseCount赞',
15 | style: TextStyle(color: Colors.white, fontSize: 13)),
16 | Spacer(),
17 | Icon(Feather.share, color: Colors.white, size: 20)
18 | ]);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/lib/qdaily/ui/vote_arc_view.dart:
--------------------------------------------------------------------------------
1 | import 'dart:math';
2 |
3 | import 'package:flutter/material.dart';
4 |
5 | class ArcPainter extends CustomPainter {
6 | final bool isCheck;
7 | final double rate;
8 |
9 | ArcPainter({this.isCheck: false, this.rate: 29.0});
10 |
11 | @override
12 | void paint(Canvas canvas, Size size) {
13 | var rect = Offset(0.0, 0.0) & Size(size.width, size.height);
14 | var paint = Paint();
15 |
16 | paint..color = isCheck ? Colors.orange[300] : Colors.grey[300];
17 | canvas.drawCircle(
18 | Offset(size.width / 2, size.width / 2), size.width / 2, paint);
19 |
20 | paint..color = isCheck ? Colors.orange[500] : Colors.grey[500];
21 | canvas.drawArc(
22 | rect, 0 * (pi / 180.0), rate / 100 * 360 * (pi / 180.0), true, paint);
23 | }
24 |
25 | @override
26 | bool shouldRepaint(CustomPainter oldDelegate) => true;
27 | }
28 |
--------------------------------------------------------------------------------
/lib/question/bean/question.dart:
--------------------------------------------------------------------------------
1 | class Question {
2 | final String question;
3 | final bool answer;
4 |
5 | Question(this.question, this.answer);
6 | }
7 |
--------------------------------------------------------------------------------
/lib/question/bean/quiz.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_app/question/bean/question.dart';
2 |
3 | class Quiz {
4 | List _questions;
5 | int _currentQuestionIndex = -1;
6 | int _score = 0;
7 |
8 | Quiz(this._questions) {
9 | _questions.shuffle();
10 | }
11 |
12 | int get score => _score;
13 |
14 | int get length => _questions.length;
15 |
16 | int get questionNumber => _currentQuestionIndex + 1;
17 |
18 | List get questions => _questions;
19 |
20 | Question get nextQuestion {
21 | _currentQuestionIndex++;
22 | if (_currentQuestionIndex >= length) return null;
23 | return _questions[_currentQuestionIndex];
24 | }
25 |
26 | void answer(bool isCorrect) {
27 | if (isCorrect) _score++;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/question/pages/score_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class ScorePage extends StatelessWidget {
4 | final int score;
5 | final int totalQuestion;
6 |
7 | ScorePage(this.score, this.totalQuestion);
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return Material(
12 | color: Colors.blueAccent,
13 | child: Column(
14 | mainAxisAlignment: MainAxisAlignment.center,
15 | children: [
16 | Text(
17 | "Your Score:",
18 | style: TextStyle(
19 | color: Colors.white,
20 | fontSize: 50.0,
21 | fontWeight: FontWeight.bold),
22 | ),
23 | Text(
24 | "$score/$totalQuestion",
25 | style: TextStyle(
26 | color: Colors.white,
27 | fontSize: 50.0,
28 | fontWeight: FontWeight.bold),
29 | ),
30 | IconButton(
31 | icon: Icon(Icons.arrow_right),
32 | onPressed: () {},
33 | color: Colors.white,
34 | iconSize: 50.0,
35 | ),
36 | ],
37 | ),
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/lib/question/ui/answer_button.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class AnswerButton extends StatelessWidget {
4 | final bool _answer;
5 | final VoidCallback _onTap;
6 |
7 | AnswerButton(this._answer, this._onTap);
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return Expanded(
12 | child: Material(
13 | color: _answer == true ? Colors.greenAccent : Colors.redAccent,
14 | child: InkWell(
15 | onTap: () => _onTap(),
16 | child: Center(
17 | child: Container(
18 | decoration: BoxDecoration(
19 | border: Border.all(
20 | color: Colors.white,
21 | width: 5.0,
22 | ),
23 | ),
24 | padding: EdgeInsets.all(10.0),
25 | child: Text(
26 | _answer == true ? "True" : "False",
27 | style: TextStyle(
28 | color: Colors.white,
29 | fontSize: 40.0,
30 | fontWeight: FontWeight.bold,
31 | fontStyle: FontStyle.italic,
32 | ),
33 | ),
34 | ),
35 | ),
36 | ),
37 | ),
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/lib/reader/details/reader_page_agent.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | /// https://github.com/huanxsd/flutter_shuqi/blob/master/lib/reader/reader_page_agent.dart
4 |
5 | class ReaderPageAgent {
6 | static List