Tutorial local images added images

This commit is contained in:
Kingkor Roy Tirtho 2022-07-09 00:20:32 +06:00
parent 89bcfecfb5
commit 3702e29135
19 changed files with 41 additions and 50 deletions

View File

Before

Width:  |  Height:  |  Size: 167 KiB

After

Width:  |  Height:  |  Size: 167 KiB

View File

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

View File

Before

Width:  |  Height:  |  Size: 273 KiB

After

Width:  |  Height:  |  Size: 273 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

BIN
assets/tutorial/step-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 744 KiB

BIN
assets/tutorial/step-2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

BIN
assets/tutorial/step-3a.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
assets/tutorial/step-3b.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
assets/tutorial/step-4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

View File

@ -23,7 +23,7 @@ class Sidebar extends HookConsumerWidget {
Widget _buildSmallLogo() { Widget _buildSmallLogo() {
return Image.asset( return Image.asset(
"assets/spotube-logo.png", "assets/images/spotube-logo.png",
height: 50, height: 50,
width: 50, width: 50,
); );

View File

@ -27,7 +27,7 @@ class Login extends HookConsumerWidget {
child: Column( child: Column(
children: [ children: [
Image.asset( Image.asset(
"assets/spotube-logo.png", "assets/images/spotube-logo.png",
width: MediaQuery.of(context).size.width * width: MediaQuery.of(context).size.width *
(breakpoint <= Breakpoints.md ? .5 : .3), (breakpoint <= Breakpoints.md ? .5 : .3),
), ),

View File

@ -40,13 +40,13 @@ class LoginTutorial extends ConsumerWidget {
pages: [ pages: [
PageViewModel( PageViewModel(
title: "Step 1", title: "Step 1",
image: CachedNetworkImage( image: Image.asset("assets/tutorial/step-1.png"),
imageUrl:
"https://user-images.githubusercontent.com/61944859/111762106-d1d37680-88ca-11eb-9884-ec7a40c0dd27.png"),
bodyWidget: Wrap( bodyWidget: Wrap(
children: [ children: [
Text("First, Go to ", Text(
style: Theme.of(context).textTheme.bodyText1), "First, Go to ",
style: Theme.of(context).textTheme.bodyText1,
),
Hyperlink( Hyperlink(
"developer.spotify.com/dashboard ", "developer.spotify.com/dashboard ",
"https://developer.spotify.com/dashboard", "https://developer.spotify.com/dashboard",
@ -61,9 +61,7 @@ class LoginTutorial extends ConsumerWidget {
), ),
PageViewModel( PageViewModel(
title: "Step 2", title: "Step 2",
image: CachedNetworkImage( image: Image.asset("assets/tutorial/step-2.png"),
imageUrl:
"https://user-images.githubusercontent.com/61944859/111762507-473f4700-88cb-11eb-91f3-d480e9584883.png"),
bodyWidget: Text( bodyWidget: Text(
"Now, create an Spotify Developer Application by Clicking on the \"CREATE AN APP\" button. Give it a name and description too", "Now, create an Spotify Developer Application by Clicking on the \"CREATE AN APP\" button. Give it a name and description too",
textAlign: TextAlign.left, textAlign: TextAlign.left,
@ -84,16 +82,19 @@ class LoginTutorial extends ConsumerWidget {
crossAxisAlignment: WrapCrossAlignment.center, crossAxisAlignment: WrapCrossAlignment.center,
children: [ children: [
Text( Text(
"Add", "Add ",
style: Theme.of(context).textTheme.bodyText1, style: Theme.of(context).textTheme.bodyText1,
), ),
TextButton( OutlinedButton(
child: Text( child: Text(
"http://localhost:4304/auth/spotify/callback", "http://localhost:4304/auth/spotify/callback",
style: Theme.of(context).textTheme.bodyText1?.copyWith( style: Theme.of(context).textTheme.bodyText1?.copyWith(
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
), ),
), ),
style: OutlinedButton.styleFrom(
shape: const RoundedRectangleBorder(),
),
onPressed: () async { onPressed: () async {
await Clipboard.setData( await Clipboard.setData(
const ClipboardData( const ClipboardData(
@ -113,7 +114,7 @@ class LoginTutorial extends ConsumerWidget {
}, },
), ),
Text( Text(
"to \"Redirect URIs\"", " to \"Redirect URIs\"",
style: Theme.of(context).textTheme.bodyText1, style: Theme.of(context).textTheme.bodyText1,
), ),
], ],
@ -125,16 +126,14 @@ class LoginTutorial extends ConsumerWidget {
children: [ children: [
ConstrainedBox( ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 500), constraints: const BoxConstraints(maxWidth: 500),
child: CachedNetworkImage( child: Image.asset(
imageUrl: "assets/tutorial/step-3a.jpg",
"https://user-images.githubusercontent.com/61944859/172991668-fa40f247-1118-4aba-a749-e669b732fa4d.jpg",
), ),
), ),
ConstrainedBox( ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 700), constraints: const BoxConstraints(maxWidth: 700),
child: CachedNetworkImage( child: Image.asset(
imageUrl: "assets/tutorial/step-3b.jpg",
"https://user-images.githubusercontent.com/61944859/111768971-d308a180-88d2-11eb-9108-3e7444cef049.png",
), ),
), ),
], ],
@ -144,34 +143,33 @@ class LoginTutorial extends ConsumerWidget {
), ),
PageViewModel( PageViewModel(
title: "Step 4", title: "Step 4",
image: CachedNetworkImage( image: Image.asset("assets/tutorial/step-4.jpg"),
imageUrl:
"https://user-images.githubusercontent.com/61944859/111769501-7fe31e80-88d3-11eb-8fc1-f3655dbd4711.png"),
body: body:
"Finally, reveal the \"Client Secret\" by clicking on the \"SHOW CLIENT SECRET\" text\n Copy the Client ID & Client Secret then Paste them in the next Screen", "Finally, reveal the \"Client Secret\" by clicking on the \"SHOW CLIENT SECRET\" text\n Copy the Client ID & Client Secret then Paste them in the next Screen",
), ),
PageViewModel(
title: "Step 5",
bodyWidget: Column(
children: [
Text(
"Paste the Copied \"Client ID\" and \"Client Secret\" Here",
style: Theme.of(context).textTheme.bodyText1,
),
const SizedBox(height: 10),
LoginForm(),
],
),
),
if (auth.isLoggedIn) if (auth.isLoggedIn)
PageViewModel( PageViewModel(
decoration: const PageDecoration( decoration: const PageDecoration(
bodyAlignment: Alignment.center, bodyAlignment: Alignment.center,
), ),
title: "Success🥳", title: "Success🥳",
image: Image.asset("assets/success.png"), image: Image.asset("assets/images/success.png"),
body: body:
"Now you're successfully Logged In with your Spotify account. Good Job, mate!", "Now you're successfully Logged In with your Spotify account. Good Job, mate!",
)
else
PageViewModel(
title: "Step 5",
bodyWidget: Column(
children: [
Text(
"Paste the Copied \"Client ID\" and \"Client Secret\" Here",
style: Theme.of(context).textTheme.bodyText1,
),
const SizedBox(height: 10),
LoginForm(),
],
),
), ),
], ],
), ),

View File

@ -39,7 +39,7 @@ class Search extends HookConsumerWidget {
return Expanded( return Expanded(
child: SafeArea( child: SafeArea(
child: Container( child: Material(
color: Theme.of(context).backgroundColor, color: Theme.of(context).backgroundColor,
child: Column( child: Column(
children: [ children: [

View File

@ -33,8 +33,8 @@ class About extends HookWidget {
onTap: () { onTap: () {
showAboutDialog( showAboutDialog(
context: context, context: context,
applicationIcon: applicationIcon: CircleAvatar(
CircleAvatar(child: Image.asset("assets/spotube-logo.png")), child: Image.asset("assets/images/spotube-logo.png")),
applicationName: "Spotube", applicationName: "Spotube",
applicationVersion: info.version, applicationVersion: info.version,
applicationLegalese: licenseText, applicationLegalese: licenseText,

View File

@ -10,7 +10,7 @@ class NotFound extends StatelessWidget {
SizedBox( SizedBox(
height: 150, height: 150,
width: 150, width: 150,
child: Image.asset("assets/empty_box.png"), child: Image.asset("assets/images/empty_box.png"),
), ),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,

View File

@ -54,7 +54,7 @@ class PlaybuttonCard extends StatelessWidget {
child: CachedNetworkImage( child: CachedNetworkImage(
imageUrl: imageUrl, imageUrl: imageUrl,
placeholder: (context, url) => placeholder: (context, url) =>
Image.asset("assets/placeholder.png"), Image.asset("assets/images/placeholder.png"),
), ),
), ),
Positioned.directional( Positioned.directional(

View File

@ -93,7 +93,8 @@ flutter:
# To add assets to your application, add an assets section, like this: # To add assets to your application, add an assets section, like this:
assets: assets:
- assets/ - assets/
# - images/a_dot_ham.jpeg - assets/images/
- assets/tutorial/
# An image asset can refer to one or more resolution-specific "variants", see # An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware. # https://flutter.dev/assets-and-images/#resolution-aware.
@ -121,14 +122,6 @@ flutter:
# For details regarding fonts from package dependencies, # For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages # see https://flutter.dev/custom-fonts/#from-packages
msix_config:
display_name: Spotube
publisher_display_name: KRTirtho
identity_name: oss.krtirtho.spotube
msix_version: 1.0.1.0
logo_path: .\assets\spotube-logo.png
capabilities: "internetClient,internetClientServer,backgroundMediaPlayback"
flutter_icons: flutter_icons:
android: true android: true
image_path: "assets/spotube-logo.png" image_path: "assets/spotube-logo.png"