├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── .idea ├── libraries │ ├── Dart_Packages.xml │ ├── Dart_SDK.xml │ └── Flutter_Plugins.xml ├── misc.xml ├── modules.xml ├── vcs.xml └── workspace.xml ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── example └── example.dart ├── lib └── splashscreen.dart ├── pubspec.lock ├── pubspec.yaml ├── screenshot.png └── splashscreen.iml /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .DS_Store 3 | .dart_tool/ 4 | 5 | .packages 6 | .pub/ 7 | *.iml 8 | 9 | build/ 10 | ios/.generated/ 11 | ios/Flutter/Generated.xcconfig 12 | ios/Runner/GeneratedPluginRegistrant.* 13 | !/splashscreen.iml 14 | -------------------------------------------------------------------------------- /.idea/libraries/Dart_Packages.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | -------------------------------------------------------------------------------- /.idea/libraries/Dart_SDK.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/libraries/Flutter_Plugins.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 26 | 27 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 101 | 102 | 103 | 105 | 106 | 109 | 110 | 111 | 123 | 124 | 125 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 154 | 155 | 158 | 159 | 160 | 161 | 164 | 165 | 168 | 169 | 172 | 173 | 174 | 175 | 178 | 179 | 182 | 183 | 186 | 187 | 188 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 215 | 216 | 217 | 218 | 219 | 220 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 287 | 288 | 289 | 335 | 336 | 337 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 360 | 361 | 364 | 365 | 366 | 373 | 376 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 401 | 402 | 403 | 414 | 415 | 416 | 450 | 451 | 458 | 459 | 460 | 461 | 479 | 486 | 487 | 490 | 491 | 492 | 493 | 494 | 502 | 503 | 508 | 509 | 511 | 512 | 513 | 515 | 516 | 517 | 518 | 1530349680560 519 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 723 | 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 755 | 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 771 | 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 785 | 786 | 787 | 788 | 789 | 790 | 791 | 792 | 793 | 794 | 795 | 796 | 797 | 798 | 799 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 832 | 833 | 834 | 835 | 836 | 837 | 838 | 839 | 840 | 841 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 | 851 | 852 | 853 | 854 | 855 | 856 | 857 | 858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | 866 | 867 | 868 | 869 | 870 | 871 | 872 | 873 | 874 | 875 | 876 | 877 | 878 | 879 | 880 | 881 | 882 | 883 | 884 | 885 | 886 | 887 | 888 | 889 | 890 | 891 | 892 | 893 | 894 | 895 | 896 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [1.4.0] - Null Safety Support 4 | 5 | * Implement null safety support 6 | 7 | ## [1.3.4] - Fix Route Name 8 | 9 | * Fix routeName issue 10 | 11 | ## [1.3.3] - Edit README.md 12 | 13 | * Add DPLYR Credits to README.md 14 | 15 | ## [1.3.2] - Raise pubscore 16 | 17 | * Change pubspec description and format files 18 | 19 | ## [1.3.1] - Edit README.md 20 | 21 | * Add similar packages 22 | 23 | ## [1.3.0] - Reopening the package 24 | 25 | * Add More Features 26 | 27 | ## [0.0.9] - Edit Readme.md 28 | 29 | * Editing 30 | 31 | ## [0.0.8] - Change Some Things 32 | 33 | * Change Image Network To Image Widget 34 | 35 | ## [0.0.7] - Add A ScreenShot in README.md 36 | 37 | * Only Edit in README.md 38 | 39 | ## [0.0.6] - Fix Some Issues & Final Release 40 | 41 | * Fix Some Issues 42 | 43 | ## [0.0.5] - Loader Color 44 | 45 | * Add Color Feature To Loader (CircularProgressIndicator) 46 | 47 | ## [0.0.4] - Release Preview 48 | 49 | * Add onClick And Fix Some Errors 50 | 51 | ## [0.0.3] - Beta 2 52 | 53 | * Add Some Features (photoRadius) 54 | 55 | ## [0.0.2] - Fix Issues 56 | 57 | * Fix Big Issues , Infinite Navigation 58 | 59 | ## [0.0.1] - Beta 1 60 | 61 | * SplashScreen Library First Release 62 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at karim@dplyr.dev. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) [year] [fullname] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [Splash Screen](https://pub.dev/packages/splashscreen) 2 | 3 | * A splashscreen package to be used for an intro for any flutter application easily with a lot of customization 4 | 5 | ## Currently Supported by awesome [DPLYR](https://dplyr.dev) 6 | 7 | ![image (alt)](https://i.imgur.com/D1WG1Bo.png&s=50) 8 | 9 | * [DPLYR](https://dplyr.dev) is a new generation of cloud platforms and aims to help developers in their road with open source contributions, and at the end we can say thanks. 10 | 11 | ## Screenshots 12 | 13 | ![screenshot description (alt)](screenshot.png) 14 | 15 | ## Usage 16 | 17 | [Example](https://github.com/KarimMohamed2005/SplashScreenFlutterPackage/blob/master/example/example.dart) 18 | 19 | To use this package : 20 | 21 | * add the dependency to your [pubspec.yaml](https://github.com/KarimMohamed2005/SplashScreenFlutterPackage/blob/master/pubspec.yaml) file. 22 | 23 | ```yaml 24 | dependencies: 25 | flutter: 26 | sdk: flutter 27 | splashscreen: 28 | ``` 29 | 30 | ### How to use 31 | 32 | ``` dart 33 | new SplashScreen.timer( 34 | seconds: 14, 35 | navigateAfterSeconds: new AfterSplash(), 36 | title: new Text('Welcome In SplashScreen'), 37 | image: new Image.asset('screenshot.png'), 38 | backgroundColor: Colors.white, 39 | styleTextUnderTheLoader: new TextStyle(), 40 | photoSize: 100.0, 41 | loaderColor: Colors.red 42 | ); 43 | ``` 44 | 45 | ## Example 46 | 47 | As time based... 48 | 49 | ``` dart 50 | import 'package:flutter/material.dart'; 51 | import 'package:splashscreen/splashscreen.dart'; 52 | 53 | void main() { 54 | runApp(MaterialApp(home: MyApp())); 55 | } 56 | 57 | class MyApp extends StatelessWidget { 58 | @override 59 | Widget build(BuildContext context) { 60 | return SplashScreen.timer( 61 | seconds: 14, 62 | navigateAfterSeconds: AfterSplash(), 63 | title: Text( 64 | 'Welcome In SplashScreen', 65 | style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0), 66 | ), 67 | image: Image.network( 68 | 'https://flutter.io/images/catalog-widget-placeholder.png', 69 | ), 70 | backgroundColor: Colors.white, 71 | loaderColor: Colors.red, 72 | ); 73 | } 74 | } 75 | 76 | class AfterSplash extends StatelessWidget { 77 | @override 78 | Widget build(BuildContext context) { 79 | return Scaffold( 80 | appBar: AppBar( 81 | title: Text('Welcome In SplashScreen Package'), 82 | automaticallyImplyLeading: false, 83 | ), 84 | body: Center( 85 | child: Text( 86 | 'Succeeded!', 87 | style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30.0), 88 | ), 89 | ), 90 | ); 91 | } 92 | } 93 | ``` 94 | 95 | As future based... 96 | 97 | ``` dart 98 | import 'package:flutter/material.dart'; 99 | import 'package:splashscreen/splashscreen.dart'; 100 | 101 | void main() { 102 | runApp(MaterialApp(home: MyApp())); 103 | } 104 | 105 | Future loadFromFuture() async { 106 | // 107 | return AfterSplash(); 108 | } 109 | 110 | class MyApp extends StatelessWidget { 111 | @override 112 | Widget build(BuildContext context) { 113 | return SplashScreen.future( 114 | navigateAfterFuture: loadFromFuture(), 115 | navigateAfterSeconds: AfterSplash(), 116 | title: Text( 117 | 'Welcome In SplashScreen', 118 | style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0), 119 | ), 120 | image: Image.network( 121 | 'https://flutter.io/images/catalog-widget-placeholder.png', 122 | ), 123 | backgroundColor: Colors.white, 124 | loaderColor: Colors.red, 125 | ); 126 | } 127 | } 128 | 129 | class AfterSplash extends StatelessWidget { 130 | @override 131 | Widget build(BuildContext context) { 132 | return Scaffold( 133 | appBar: AppBar( 134 | title: Text('Welcome In SplashScreen Package'), 135 | automaticallyImplyLeading: false, 136 | ), 137 | body: Center( 138 | child: Text( 139 | 'Succeeded!', 140 | style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30.0), 141 | ), 142 | ), 143 | ); 144 | } 145 | } 146 | ``` 147 | 148 | ### Animate the main image with the hero animation 149 | 150 | The main image has this tag attached to it `splashscreenImage`. Add it to whatever page you'll navigate to. This will animate the main Image to the same image you put in another page 151 | 152 | ### Adding a custom page tranistion 153 | 154 | You can use the `pageRoute` to do just this. Here's an example 155 | 156 | ```dart 157 | import 'package:flutter/material.dart'; 158 | import 'package:splashscreen/splashscreen.dart'; 159 | 160 | void main() { 161 | runApp(MaterialApp(home: MyApp())); 162 | } 163 | 164 | Route _createRoute() { 165 | return PageRouteBuilder( 166 | pageBuilder: (context, animation, secondaryAnimation) => AfterSplash(), 167 | transitionsBuilder: (context, animation, secondaryAnimation, child) { 168 | var begin = Offset(0.0, 1.0); 169 | var end = Offset.zero; 170 | var curve = Curves.ease; 171 | var tween = Tween(begin: begin, end: end).chain(CurveTween(curve: curve)); 172 | return SlideTransition( 173 | position: animation.drive(tween), 174 | child: child, 175 | ); 176 | }, 177 | ); 178 | } 179 | 180 | class MyApp extends StatelessWidget { 181 | @override 182 | Widget build(BuildContext context) { 183 | return SplashScreen.timer( 184 | seconds: 14, 185 | navigateAfterSeconds: AfterSplash(), 186 | title: Text( 187 | 'Welcome In SplashScreen', 188 | style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0), 189 | ), 190 | image: Image.network( 191 | 'https://flutter.io/images/catalog-widget-placeholder.png', 192 | ), 193 | backgroundColor: Colors.white, 194 | loaderColor: Colors.red, 195 | pageRoute: _createRoute(), 196 | ); 197 | } 198 | } 199 | 200 | class AfterSplash extends StatelessWidget { 201 | @override 202 | Widget build(BuildContext context) { 203 | return Scaffold( 204 | appBar: AppBar( 205 | title: Text('Welcome In SplashScreen Package'), 206 | automaticallyImplyLeading: false, 207 | ), 208 | body: Center( 209 | child: Text( 210 | 'Succeeded!', 211 | style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30.0), 212 | ), 213 | ), 214 | ); 215 | } 216 | } 217 | ``` 218 | 219 | ### All Supported Projects by [DPLYR](https://dplyr.dev) 220 | 221 | * [Splash Screen - Flutter](https://github.com/DPLYR-dev/SplashScreenFlutterPackage) 222 |
a flutter package created to show simple splashscreen 223 | 224 | * [In App Call Alert - Flutter](https://github.com/DPLYR-dev/InAppCallAlert) 225 |
a flutter package created to show call alert with sound 226 | 227 | * [File Manager](https://github.com/DPLYR-dev/file-manager) 228 |
a php project created to manage machines/servers through ftp servers 229 | 230 | * [Countries Js](https://github.com/DPLYR-dev/file-manager) 231 |
a javascript project created for retrieving country details with flexibility. 232 | 233 | * [Block temp mails](https://github.com/DPLYR-dev/block-temp-emails) 234 |
a javascript api to prevent temporary emails from signing up on your website. Super easy to use 235 | 236 | * [Disposable Emails List](https://github.com/DPLYR-dev/disposable-emails-list-domains-spam) 237 |
a python script to generate the temporary and spam doamins to prevent them and you can block them through this API [Block temp mails](https://github.com/DPLYR-dev/block-temp-emails) 238 | 239 | * [Basic CRM](https://github.com/DPLYR-dev/basic-crm) 240 |
A crm that is developed with Node Js for entreprenurs who need a basic CRM with text replacment feature 241 | 242 | * [Basic Finance](https://github.com/DPLYR-dev/basic-finance) 243 |
A finance that is developed with Node Js 244 | 245 | ### About DPLYR 246 | 247 | [DPLYR](https://www.dplyr.dev) is a SaaS tool that helps developers just like you to deploy their web apps more easily. It supports deploying Node.js apps with MongoDB, MySQL or PostgreSQL databases all for free. Go now to [www.dplyr.dev](https://www.dplyr.dev) and create a free account. 248 | 249 | ### Created by [Karim Mohamed](https://github.com/KarimMohamed20) 250 | -------------------------------------------------------------------------------- /example/example.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:splashscreen/splashscreen.dart'; 3 | 4 | void main() { 5 | runApp(MaterialApp(home: MyApp())); 6 | } 7 | 8 | class MyApp extends StatelessWidget { 9 | @override 10 | Widget build(BuildContext context) { 11 | return SplashScreen.timer( 12 | seconds: 14, 13 | navigateAfterSeconds: AfterSplash(), 14 | title: Text( 15 | 'Welcome In SplashScreen', 16 | style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0), 17 | ), 18 | image: Image.network( 19 | 'https://flutter.io/images/catalog-widget-placeholder.png', 20 | ), 21 | backgroundColor: Colors.white, 22 | loaderColor: Colors.red, 23 | ); 24 | } 25 | } 26 | 27 | class AfterSplash extends StatelessWidget { 28 | @override 29 | Widget build(BuildContext context) { 30 | return Scaffold( 31 | appBar: AppBar( 32 | title: Text('Welcome In SplashScreen Package'), 33 | automaticallyImplyLeading: false, 34 | ), 35 | body: Center( 36 | child: Text( 37 | 'Succeeded!', 38 | style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30.0), 39 | ), 40 | ), 41 | ); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /lib/splashscreen.dart: -------------------------------------------------------------------------------- 1 | library splashscreen; 2 | 3 | import 'dart:async'; 4 | import 'dart:core'; 5 | 6 | import 'package:flutter/material.dart'; 7 | 8 | class SplashScreen extends StatefulWidget { 9 | /// Seconds to navigate after for time based navigation 10 | final int? seconds; 11 | 12 | /// App title, shown in the middle of screen in case of no image available 13 | final Text title; 14 | 15 | /// Page background color 16 | final Color backgroundColor; 17 | 18 | /// Style for the laodertext 19 | final TextStyle styleTextUnderTheLoader; 20 | 21 | /// The page where you want to navigate if you have chosen time based navigation 22 | /// String or Widget 23 | final Object? navigateAfterSeconds; 24 | 25 | /// Main image size 26 | final double? photoSize; 27 | 28 | /// Triggered if the user clicks the screen 29 | final GestureTapCallback? onClick; 30 | 31 | /// Loader color 32 | final Color? loaderColor; 33 | 34 | /// Main image mainly used for logos and like that 35 | final Image? image; 36 | 37 | /// Loading text, default: 'Loading' 38 | final Text loadingText; 39 | 40 | /// Padding for long Loading text, default: EdgeInsets.all(0) 41 | final EdgeInsets loadingTextPadding; 42 | 43 | /// Background image for the entire screen 44 | final ImageProvider? imageBackground; 45 | 46 | /// Background gradient for the entire screen 47 | final Gradient? gradientBackground; 48 | 49 | /// Whether to display a loader or not 50 | final bool useLoader; 51 | 52 | /// Custom page route if you have a custom transition you want to play 53 | final Route? pageRoute; 54 | 55 | /// RouteSettings name for pushing a route with custom name (if left out in MaterialApp route names) to navigator stack (Contribution by Ramis Mustafa) 56 | final String? routeName; 57 | 58 | /// expects a function that returns a future, when this future is returned it will navigate 59 | /// Future or Future 60 | final Future? navigateAfterFuture; 61 | 62 | static const _defaultStyleTextUnderTheLoader = TextStyle( 63 | fontSize: 18.0, 64 | fontWeight: FontWeight.bold, 65 | color: Colors.black, 66 | ); 67 | 68 | /// Use one of the provided factory constructors instead of. 69 | @protected 70 | SplashScreen({ 71 | this.loaderColor, 72 | this.navigateAfterFuture, 73 | this.seconds, 74 | this.photoSize, 75 | this.pageRoute, 76 | this.onClick, 77 | this.navigateAfterSeconds, 78 | required this.title, 79 | required this.backgroundColor, 80 | required this.styleTextUnderTheLoader, 81 | this.image, 82 | required this.loadingText, 83 | required this.loadingTextPadding, 84 | this.imageBackground, 85 | this.gradientBackground, 86 | required this.useLoader, 87 | this.routeName, 88 | }) : assert( 89 | routeName == null || 90 | (routeName is String && routeName.startsWith('/')), 91 | 'routeName must be a String beginning with forward slash (/)', 92 | ), 93 | assert( 94 | navigateAfterFuture == null || 95 | navigateAfterFuture is Future || 96 | navigateAfterFuture is Future, 97 | 'navigateAfterFuture must be a Future or Future', 98 | ), 99 | assert( 100 | navigateAfterFuture != null || seconds != null, 101 | 'navigateAfterFuture and seconds cant be null at the same time', 102 | ), 103 | assert( 104 | navigateAfterFuture != null || 105 | navigateAfterSeconds is String || 106 | navigateAfterSeconds is Widget, 107 | 'navigateAfterSeconds must either be a String or Widget', 108 | ), 109 | assert( 110 | navigateAfterSeconds is! String || 111 | (navigateAfterSeconds is String && 112 | navigateAfterSeconds.startsWith('/')), 113 | 'navigateAfterSeconds must be a String beginning with forward slash (/)', 114 | ); 115 | 116 | factory SplashScreen.timer({ 117 | required int seconds, 118 | Color? loaderColor, 119 | Color backgroundColor = Colors.white, 120 | double? photoSize, 121 | Text loadingText = const Text(''), 122 | EdgeInsets loadingTextPadding = const EdgeInsets.only(top: 10.0), 123 | Image? image, 124 | Route? pageRoute, 125 | GestureTapCallback? onClick, 126 | Object? navigateAfterSeconds, 127 | Text title = const Text(''), 128 | TextStyle styleTextUnderTheLoader = _defaultStyleTextUnderTheLoader, 129 | ImageProvider? imageBackground, 130 | Gradient? gradientBackground, 131 | bool useLoader = true, 132 | String? routeName, 133 | }) => 134 | SplashScreen( 135 | loaderColor: loaderColor, 136 | seconds: seconds, 137 | photoSize: photoSize, 138 | loadingText: loadingText, 139 | loadingTextPadding: loadingTextPadding, 140 | backgroundColor: backgroundColor, 141 | image: image, 142 | pageRoute: pageRoute, 143 | onClick: onClick, 144 | navigateAfterSeconds: navigateAfterSeconds, 145 | title: title, 146 | styleTextUnderTheLoader: styleTextUnderTheLoader, 147 | imageBackground: imageBackground, 148 | gradientBackground: gradientBackground, 149 | useLoader: useLoader, 150 | routeName: routeName, 151 | ); 152 | 153 | factory SplashScreen.future({ 154 | required Future navigateAfterFuture, 155 | Color? loaderColor, 156 | Color backgroundColor = Colors.white, 157 | double? photoSize, 158 | Text loadingText = const Text(''), 159 | EdgeInsets loadingTextPadding = const EdgeInsets.only(top: 10.0), 160 | Image? image, 161 | Route? pageRoute, 162 | GestureTapCallback? onClick, 163 | dynamic navigateAfterSeconds, 164 | Text title = const Text(''), 165 | TextStyle styleTextUnderTheLoader = _defaultStyleTextUnderTheLoader, 166 | ImageProvider? imageBackground, 167 | Gradient? gradientBackground, 168 | bool useLoader = true, 169 | String? routeName, 170 | }) => 171 | SplashScreen( 172 | loaderColor: loaderColor, 173 | navigateAfterFuture: navigateAfterFuture, 174 | photoSize: photoSize, 175 | loadingText: loadingText, 176 | loadingTextPadding: loadingTextPadding, 177 | backgroundColor: backgroundColor, 178 | image: image, 179 | pageRoute: pageRoute, 180 | onClick: onClick, 181 | navigateAfterSeconds: navigateAfterSeconds, 182 | title: title, 183 | styleTextUnderTheLoader: styleTextUnderTheLoader, 184 | imageBackground: imageBackground, 185 | gradientBackground: gradientBackground, 186 | useLoader: useLoader, 187 | routeName: routeName, 188 | ); 189 | 190 | @override 191 | _SplashScreenState createState() => _SplashScreenState(); 192 | } 193 | 194 | class _SplashScreenState extends State { 195 | @override 196 | void initState() { 197 | super.initState(); 198 | if (widget.navigateAfterFuture == null) { 199 | Timer(Duration(seconds: widget.seconds!), () { 200 | if (widget.navigateAfterSeconds is String) { 201 | // It's fairly safe to assume this is using the in-built material 202 | // named route component 203 | Navigator.of(context).pushReplacementNamed( 204 | widget.navigateAfterSeconds as String, 205 | ); 206 | } else if (widget.navigateAfterSeconds is Widget) { 207 | Navigator.of(context).pushReplacement( 208 | widget.pageRoute != null 209 | ? widget.pageRoute! 210 | : MaterialPageRoute( 211 | settings: widget.routeName != null 212 | ? RouteSettings(name: widget.routeName) 213 | : null, 214 | builder: (context) => widget.navigateAfterSeconds as Widget, 215 | ), 216 | ); 217 | } 218 | }); 219 | } else { 220 | widget.navigateAfterFuture!.then((navigateTo) { 221 | if (navigateTo is String) { 222 | // It's fairly safe to assume this is using the in-built material 223 | // named route component 224 | Navigator.of(context).pushReplacementNamed(navigateTo); 225 | } else if (navigateTo is Widget) { 226 | Navigator.of(context).pushReplacement( 227 | widget.pageRoute != null 228 | ? widget.pageRoute! 229 | : MaterialPageRoute( 230 | settings: widget.routeName != null 231 | ? RouteSettings(name: widget.routeName) 232 | : null, 233 | builder: (context) => navigateTo), 234 | ); 235 | } 236 | }); 237 | } 238 | } 239 | 240 | @override 241 | Widget build(BuildContext context) { 242 | return Scaffold( 243 | body: InkWell( 244 | onTap: widget.onClick, 245 | child: Stack( 246 | fit: StackFit.expand, 247 | children: [ 248 | Container( 249 | decoration: BoxDecoration( 250 | image: widget.imageBackground != null 251 | ? DecorationImage( 252 | fit: BoxFit.cover, 253 | image: widget.imageBackground!, 254 | ) 255 | : null, 256 | gradient: widget.gradientBackground, 257 | color: widget.backgroundColor, 258 | ), 259 | ), 260 | Column( 261 | mainAxisAlignment: MainAxisAlignment.start, 262 | children: [ 263 | Expanded( 264 | flex: 2, 265 | child: Container( 266 | child: Column( 267 | mainAxisAlignment: MainAxisAlignment.center, 268 | children: [ 269 | CircleAvatar( 270 | backgroundColor: Colors.transparent, 271 | child: Hero( 272 | tag: 'splashscreenImage', 273 | child: Container(child: widget.image), 274 | ), 275 | radius: widget.photoSize, 276 | ), 277 | Padding( 278 | padding: const EdgeInsets.only(top: 10.0), 279 | ), 280 | widget.title 281 | ], 282 | ), 283 | ), 284 | ), 285 | Expanded( 286 | flex: 1, 287 | child: Column( 288 | mainAxisAlignment: MainAxisAlignment.center, 289 | children: [ 290 | widget.useLoader 291 | ? CircularProgressIndicator( 292 | valueColor: AlwaysStoppedAnimation( 293 | widget.loaderColor, 294 | ), 295 | ) 296 | : Container(), 297 | Padding( 298 | padding: const EdgeInsets.only(top: 20.0), 299 | ), 300 | Padding( 301 | padding: widget.loadingTextPadding, 302 | child: widget.loadingText, 303 | ), 304 | ], 305 | ), 306 | ), 307 | ], 308 | ), 309 | ], 310 | ), 311 | ), 312 | ); 313 | } 314 | } 315 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | characters: 5 | dependency: transitive 6 | description: 7 | name: characters 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "1.1.0" 11 | collection: 12 | dependency: transitive 13 | description: 14 | name: collection 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.15.0" 18 | flutter: 19 | dependency: "direct main" 20 | description: flutter 21 | source: sdk 22 | version: "0.0.0" 23 | meta: 24 | dependency: transitive 25 | description: 26 | name: meta 27 | url: "https://pub.dartlang.org" 28 | source: hosted 29 | version: "1.3.0" 30 | sky_engine: 31 | dependency: transitive 32 | description: flutter 33 | source: sdk 34 | version: "0.0.99" 35 | typed_data: 36 | dependency: transitive 37 | description: 38 | name: typed_data 39 | url: "https://pub.dartlang.org" 40 | source: hosted 41 | version: "1.3.0" 42 | vector_math: 43 | dependency: transitive 44 | description: 45 | name: vector_math 46 | url: "https://pub.dartlang.org" 47 | source: hosted 48 | version: "2.1.0" 49 | sdks: 50 | dart: ">=2.12.0 <3.0.0" 51 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: splashscreen 2 | description: A splashscreen package created as intro for any flutter application easily with a lot of customization 3 | version: 1.4.0 4 | homepage: https://github.com/DPLYR-dev/SplashScreenFlutterPackage 5 | 6 | environment: 7 | sdk: '>=2.12.0 <3.0.0' 8 | 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DPLYR-dev/SplashScreenFlutterPackage/a05b64f8326f7c2615491e9f47a1f2dcf8b28a69/screenshot.png -------------------------------------------------------------------------------- /splashscreen.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | --------------------------------------------------------------------------------