Skip to content

Tushargupta9800/flutter-Simple-Animations-for-loading-screen

Repository files navigation

flutter-Simple-Animations-for-loading-screen

Simple pages which uses animation and custom painter
Total 8 loading screens are updated in this repo
The main motive of this repository for me is to learn flutter animation and custom painting better.
If you see anything wrong with any code then do not hesitate to raise the issue.. 😊😊

screenshots

Sr. No. GIF Code function to use this loading
loading1 code loading1(color: Colors.green,),
loading2 code loading2(fromcolor: Colors.yellowAccent,
tocolor: Colors.redAccent),
loading3 code loading3(color: Colors.yellowAccent, child: Container(),
loading4 code loading4(color: Colors.yellowAccent),
loading5 code loading5(xpos: MediaQuery.of(context).size.width * 0.5,
ypos: MediaQuery.of(context).size.height * 0.5, color: Colors.yellowAccent),
loading6 code loading6(pos: Offset(MediaQuery.of(context).size.width * 0.5,
MediaQuery.of(context).size.height * 0.5),
radius: 3.0,
color: Colors.redAccent,
jump: 50.0,
StrokeWidth: 6.0),
loading6 code loading6(pos: Offset(MediaQuery.of(context).size.width * 0.5,
MediaQuery.of(context).size.height * 0.5),
radius: 0.0,
color: Colors.redAccent,
jump: 50.0,
StrokeWidth: 10.0),
loading7 code loading7(BackColor: Colors.white, CircleColor: Colors.black,),
loading8 code loading8(color1: Colors.teal,
color2: Colors.yellowAccent,
color3: Colors.red,
color4: Colors.black,
Chooseoutof4: 3,
pos: Offset(MediaQuery.of(context).size.width0.5,
MediaQuery.of(context).size.height
0.5),
),

Note:- Actual animation is far better then above GIFs.

more cool stuff to come soon so keep a watch on this repo.

How to use these loadings?

  1. Clone and star this repo.
  2. Create a new flutter project.
  3. Add the loading(i).dart file(whichever you like out of them) in your project.
  4. import the loading(i).dart file in your main.dart file.
  5. call the function loading(i) as stated in the table above. (still confused?? see main.dart file)
  6. That's it enjoy the loadings.

LICENSE

MIT License

Copyright (c) 2020 Tushar Gupta

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.