diff --git a/assets/images/a.png b/assets/images/a.png new file mode 100644 index 0000000..225b46d Binary files /dev/null and b/assets/images/a.png differ diff --git a/assets/images/b.png b/assets/images/b.png new file mode 100644 index 0000000..cc1de78 Binary files /dev/null and b/assets/images/b.png differ diff --git a/assets/images/c.png b/assets/images/c.png new file mode 100644 index 0000000..51c5120 Binary files /dev/null and b/assets/images/c.png differ diff --git a/assets/images/d.png b/assets/images/d.png new file mode 100644 index 0000000..85a683d Binary files /dev/null and b/assets/images/d.png differ diff --git a/assets/images/jp1.png b/assets/images/jp1.png new file mode 100644 index 0000000..9ff8315 Binary files /dev/null and b/assets/images/jp1.png differ diff --git a/assets/images/jp2.png b/assets/images/jp2.png new file mode 100644 index 0000000..a12e34f Binary files /dev/null and b/assets/images/jp2.png differ diff --git a/assets/images/jp3.png b/assets/images/jp3.png new file mode 100644 index 0000000..1574a74 Binary files /dev/null and b/assets/images/jp3.png differ diff --git a/assets/images/jp4.png b/assets/images/jp4.png new file mode 100644 index 0000000..92aadc3 Binary files /dev/null and b/assets/images/jp4.png differ diff --git a/assets/images/jp5.png b/assets/images/jp5.png new file mode 100644 index 0000000..4877865 Binary files /dev/null and b/assets/images/jp5.png differ diff --git a/assets/images/jp6.png b/assets/images/jp6.png new file mode 100644 index 0000000..7bda931 Binary files /dev/null and b/assets/images/jp6.png differ diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig index 592ceee..e8efba1 100644 --- a/ios/Flutter/Debug.xcconfig +++ b/ios/Flutter/Debug.xcconfig @@ -1 +1,2 @@ +#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig index 592ceee..399e934 100644 --- a/ios/Flutter/Release.xcconfig +++ b/ios/Flutter/Release.xcconfig @@ -1 +1,2 @@ +#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/ios/Podfile b/ios/Podfile new file mode 100644 index 0000000..1e8c3c9 --- /dev/null +++ b/ios/Podfile @@ -0,0 +1,41 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '9.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/lib/buttomNavigation.dart b/lib/buttomNavigation.dart new file mode 100644 index 0000000..487f1ca --- /dev/null +++ b/lib/buttomNavigation.dart @@ -0,0 +1,105 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_list_app/buttomView/home.dart'; +import 'buttomView/setting.dart'; + +class ButtomNavigation extends StatelessWidget { + final int pageIndex; + + ButtomNavigation(this.pageIndex); + + final List _pageLinks = [ + Home(), + Setting(), + ]; + + + + @override + Widget build(BuildContext context) { + + return BottomNavigationBar( + type: BottomNavigationBarType.fixed, + currentIndex: pageIndex, + items: [ + BottomNavigationBarItem( + title: Text( + 'ホーム' + // Strings.PROFILE_PAGE_TITLE, + // style: textSize, + ), + icon: tabBarIcon(Icons.filter_list), + activeIcon: tabBarIcon(Icons.filter_list, color: Colors.white), + ), + BottomNavigationBarItem( + title: Text( + 'ホーム2' + // Strings.COMMUNITY_PAGE_TITLE, + // style: text + ), + icon: tabBarIcon(Icons.filter_list), + activeIcon: tabBarIcon(Icons.filter_list, color: Colors.white), + ), + BottomNavigationBarItem( + title: Text( + 'ホーム3' + // Strings.SHARE_PAGE_TITLE, + // style: textSize, + ), + icon: tabBarIcon(Icons.filter_list), + activeIcon: tabBarIcon(Icons.filter_list, color: Colors.white), + ), + BottomNavigationBarItem( + title: Text( + 'ホーム4' + // Strings.NOTIFICATION_PAGE_TITLE, + // style: textSize, + ), + ), + BottomNavigationBarItem( + title: Text( + 'ホーム5' + // Strings.SETTING_PAGE_TITLE, + // style: textSize, + ), + icon: tabBarIcon(Icons.filter_list), + activeIcon: tabBarIcon(Icons.filter_list, color: Colors.white), + ), + ], + onTap: (tappedIndex) async { + Navigator.pushReplacement( + context, + quickPageRoute(_pageLinks[tappedIndex]), + ); + }, + ); + } + + tabBarIcon(pathIcon, {Color color}) { + return Container( + width: 10, + height: 10, + child: Center( + child: SizedBox.fromSize( + child: Icon(Icons.filter_list, color: Colors.white), + ), + ), + ); + } + + final quickPageRoute = (Widget widget) => PageRouteBuilder( + pageBuilder: (BuildContext context, Animation animation, + Animation secondaryAnimation) { + return widget; + }, + transitionsBuilder: (BuildContext context, Animation animation, + Animation secondaryAnimation, Widget child) { + return new SlideTransition( + position: new Tween(begin: Offset.zero, end: Offset.zero) + .animate(const AlwaysStoppedAnimation(1.0)), + child: child, + ); + }, + ); +} + + diff --git a/lib/buttomView/home.dart b/lib/buttomView/home.dart new file mode 100644 index 0000000..08b9a5c --- /dev/null +++ b/lib/buttomView/home.dart @@ -0,0 +1,77 @@ + +import 'package:flutter/material.dart'; +import 'package:flutter_list_app/instructor/list_instructor.dart'; + +import '../novel_design.dart'; +import '../single_scroll_screen.dart'; + +class Home extends StatelessWidget { + int _tabIndex; + + @override + void initState() { + _tabIndex = 0; + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Form', + home: Scaffold( + appBar: AppBar( + title: Text('Home'), + ), + body: ListView( + children: [ + GestureDetector( + child: Card( + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 8), + child: Text('ListView & Row & Padding', style: TextStyle(fontSize: 18)), + ), + ), + onTap: (){ + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => ListimstrutorPage(), + ), + ); + }, + ), + GestureDetector( + child: Card( + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 8), + child: Text('DashbordPage: Column & Container', style: TextStyle(fontSize: 18)), + ), + ), + onTap: (){ + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => NovelDesign(), + ), + ); + }, + ), + GestureDetector( + child: Card( + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 8), + child: Text('Side-scrolling', style: TextStyle(fontSize: 18)), + ), + ), + onTap: (){ + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => SingleChildScreen(), + ), + ); + }, + ), + ], + ), + ), + ); + } +} + diff --git a/lib/buttomView/setting.dart b/lib/buttomView/setting.dart new file mode 100644 index 0000000..e67b372 --- /dev/null +++ b/lib/buttomView/setting.dart @@ -0,0 +1,53 @@ +import 'package:flutter/material.dart'; + +class Setting extends StatefulWidget { + @override + _settingPageState createState() => _settingPageState(); +} + +class _settingPageState extends State { + var index = 1; + List isSelected = List.generate(2, (_) => false); + + @override + Widget build(BuildContext context) { + return Scaffold( + body: Center( + child: ToggleButtons( + borderColor: Colors.white, + fillColor: Colors.white, + borderWidth: 2, + selectedBorderColor: Colors.white, + selectedColor: Colors.grey, + borderRadius: BorderRadius.circular(30), + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + '登録順', + style: TextStyle(fontSize: 16), + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + '講義別', + style: TextStyle(fontSize: 16), + ), + ), + ], + onPressed: (int index) { + setState(() { + // isSelected[index] = !isSelected[index]; + for (int i = 0; i < isSelected.length; i++) { + isSelected[i] = i == index; + } + + }); + }, + isSelected: isSelected, + ), + ), + ); + } +} diff --git a/lib/card_list.dart b/lib/card_list.dart new file mode 100644 index 0000000..0340941 --- /dev/null +++ b/lib/card_list.dart @@ -0,0 +1,22 @@ +import 'package:flutter/material.dart'; + +class CardList extends StatelessWidget { + final String _text; + + CardList(this._text); + + @override + Widget build(BuildContext context) { + return Card( + child: Column(mainAxisSize: MainAxisSize.max, children: [ + ListTile( + leading: FlutterLogo(), + title: Text(_text), + subtitle: Text( + "This is subtitle. Subtitle is very long and use three lines."), + selected: true, + ) + ]), + ); + } +} diff --git a/lib/dashboard.dart b/lib/dashboard.dart new file mode 100644 index 0000000..bfaf62a --- /dev/null +++ b/lib/dashboard.dart @@ -0,0 +1,157 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_list_app/buttomView/home.dart'; +import 'package:google_fonts/google_fonts.dart'; + +import 'detailspage.dart'; + +class DashbordPage extends StatefulWidget { + @override + _DashbordPageState createState() => _DashbordPageState(); +} + +class _DashbordPageState extends State { + @override + Widget build(BuildContext context) { + return Column( + children: [ + SizedBox(height: 20.0), + Padding( + padding: EdgeInsets.all(15.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GestureDetector( + child: Container( + height: 40.0, + width: 40.0, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(7.0), + color: Color(0xFFFD4F99) + ), + child: Center( + child: Icon(Icons.filter_list, color: Colors.white), + ), + ), + onTap: (){ + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => Home(), + ), + ); + }, + ), + Text( + 'HOME', + style: GoogleFonts.montserrat( + fontSize: 16.5, + fontWeight: FontWeight.w400, + textStyle: TextStyle(color: Colors.white) + ), + ), + Container( + height: 40.0, + width: 40.0, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(7.0), + color: Color(0xFF353535) + ), + child: Center( + child: Icon(Icons.bookmark_border, color: Colors.white), + ), + ), + ], + ), + ), + SizedBox(height: 5.0), + Container( + height: MediaQuery.of(context).size.height - 150.0, + child: ListView( + children: [ + _buildListItem('assets/images/jp1.png', 'Mt.Fuji', 'Explore tha land of the rising night'), + _buildListItem('assets/images/jp2.png', 'Kmakura', 'Explore tha land of the rising night'), + _buildListItem('assets/images/jp3.png', 'Ajisai', 'Explore tha land of the rising night') + ], + ), + ) + ], + ); + } + + _buildListItem(String imgPath, String country, String description){ + return Padding( + padding: EdgeInsets.all(15.0), + child: Stack( + children: [ + Container( + height: 300.0, + ), + Container( + height: 300.0, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10.0), + image: DecorationImage( + image: AssetImage(imgPath), + fit: BoxFit.cover, + colorFilter: ColorFilter.mode(Colors.black.withOpacity(0.6), BlendMode.darken) + ) + ), + ), + Container( + height: 300.0, + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + country, + style: GoogleFonts.montserrat( + fontSize: 30.0, + fontWeight: FontWeight.bold, + textStyle: TextStyle(color: Colors.white) + ), + ), + Text( + description, + style: GoogleFonts.montserrat( + fontSize: 15.0, + fontWeight: FontWeight.w400, + textStyle: TextStyle(color: Colors.white) + ), + ), + SizedBox(height: 20.0,), + InkWell( + onTap: (){ + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => DetailsPage(imgPath: imgPath, title: country), + ), + ); + }, + child: Container( + height: 50.0, + width: 125.0, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10.0), + color: Colors.white + ), + child: Center( + child: Text('Explore now', + style: GoogleFonts.montserrat( + fontSize: 12.0, + fontWeight: FontWeight.bold, + textStyle: TextStyle(color: Color(0xFFFD4F99)) + ), + ), + ), + ), + ) + ], + ), + ), + ) + ], + ), + ); + } +} diff --git a/lib/detailspage.dart b/lib/detailspage.dart new file mode 100644 index 0000000..1f6d579 --- /dev/null +++ b/lib/detailspage.dart @@ -0,0 +1,170 @@ +import 'dart:ui'; + +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; + +class DetailsPage extends StatefulWidget { + + final imgPath, title; + + DetailsPage({this.imgPath, this.title}); + + @override + _DetailsPageState createState() => _DetailsPageState(); +} + +class _DetailsPageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + body: Stack( + children: [ + Container( + height: MediaQuery.of(context).size.height, + width: MediaQuery.of(context).size.width, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage(widget.imgPath), fit: BoxFit.cover) + ), + ), + BackdropFilter( + filter: new ImageFilter.blur(sigmaX: 4, sigmaY: 4), + child: Container( + decoration: BoxDecoration(color: Colors.black.withOpacity(0.5)), + ), + ), + Padding( + padding: EdgeInsets.fromLTRB(15.0, 35.0, 15.0, 15.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + height: 40.0, + width: 40.0, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(7.0), + color: Color(0xFFFD4F99) + ), + child: Center( + child: Icon(Icons.filter_list, color: Colors.white), + ), + ), + Text(widget.title.toString().toUpperCase(), + style: GoogleFonts.montserrat( + fontSize: 18.0, + fontWeight: FontWeight.w400, + textStyle: TextStyle(color: Colors.white) + ), + ), + Container( + height: 40.0, + width: 40.0, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(7.0), + color: Color(0xFF353535) + ), + child: Center( + child: Icon(Icons.bookmark_border, color: Colors.white), + ), + ), + ], + ), + ), + Positioned( + top: 100.0, + child: Padding( + padding: EdgeInsets.all(15.0), + child: Column( + children: [ + Container( + width: MediaQuery.of(context).size.width - 15.0, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text('Trending Attractions', + style: GoogleFonts.montserrat( + fontSize: 22.0, + fontWeight: FontWeight.bold, + textStyle: TextStyle(color: Colors.white), + ), + ), + IconButton( + icon: Icon(Icons.more_vert,color: Colors.white), + onPressed: (){}, + ) + ], + ), + ), + SizedBox(height: 10.0), + Stack( + children: [ + Padding( + padding: EdgeInsets.only(right: 10.0), + child: Container( + height: 200.0, + width: 325.0, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10.0), + image: DecorationImage( + image: AssetImage('assets/images/jp4.png'), + fit: BoxFit.cover, + colorFilter: ColorFilter.mode(Colors.black.withOpacity(0.6), BlendMode.darken) + ) + ), + ), + ), + Positioned( + top: 125.0, + left: 10.0, + child: Container( + width: MediaQuery.of(context).size.width - 100.0, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('Kamakura Tour', + style: GoogleFonts.montserrat( + fontSize: 18.0, + fontWeight: FontWeight.bold, + textStyle: TextStyle(color: Colors.white) + ), + ), + Text('Three days tour around Japan', + style: GoogleFonts.montserrat( + fontSize: 13.0, + // fontWeight: FontWeight.bold, + textStyle: TextStyle(color: Colors.white)), + ) + ], + ), + Container( + height: 30.0, + width: 30.0, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(7.0), + color: Colors.white), + child: Center( + child: Icon(Icons.arrow_forward_ios, size: 15,color: Color(0xFFFD4F99)), + ), + ) + ], + ), + ), + ) + ], + ), + SizedBox(height: 20.0), + Container( + + ) + ], + ), + ), + ) + ], + ), + ); + } +} \ No newline at end of file diff --git a/lib/instructor/instructor_detail.dart b/lib/instructor/instructor_detail.dart new file mode 100644 index 0000000..f79bdbf --- /dev/null +++ b/lib/instructor/instructor_detail.dart @@ -0,0 +1,239 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_list_app/models/instructor.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:smooth_star_rating/smooth_star_rating.dart'; + +class InstructorDetails extends StatefulWidget { + final Instructor selectInstructor; + + InstructorDetails({this.selectInstructor}); + + @override + _InstructorDetailsState createState() => _InstructorDetailsState(); +} + +class _InstructorDetailsState extends State { + @override + Widget build(BuildContext context) { + var screenHeight = MediaQuery.of(context).size.height; + var screenWidth = MediaQuery.of(context).size.width; + + return Scaffold( + body: Stack( + children: [ + Container( + height: screenHeight, + width: screenWidth, + color: Colors.transparent, + ), + Container( + height: screenHeight - screenHeight / 3, + width: screenWidth, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage('assets/images/a.png'), fit: BoxFit.cover)), + ), + Positioned( + top: screenHeight - screenHeight / 3 - 25.0, + child: Container( + padding: EdgeInsets.only(left: 20.0), + height: screenHeight / 3 + 25.0, + width: screenWidth, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox(height: 25.0), + // Text(Widget.selectedInstructor.instructorName) + Text('TextFirst', + style: GoogleFonts.tinos( + fontSize: 25.0, fontWeight: FontWeight.w500)), + SizedBox(height: 7.0), + Text('Japanese ABC', + style: GoogleFonts.sourceSansPro( + fontSize: 15.0, + fontWeight: FontWeight.w400, + color: Color(0xFF5E5B54))), + SizedBox(height: 7.0), + Row( + children: [ + SmoothStarRating( + allowHalfRating: false, + starCount: 5, + rating: 4.0, + size: 15.0, + color: Color(0xFFF36F32), + borderColor: Color(0xFFF36F32), + spacing: 0.0), + SizedBox(height: 7.0), + Text('(200 Reviews)', + style: GoogleFonts.sourceSansPro( + fontSize: 15.0, + fontWeight: FontWeight.w400, + color: Color(0xFFC2C0B6))), + ], + ), + SizedBox(height: 3.0), + Text('A Star rating with touch and swipe rate enabled.Read only and adjustable rating, Web Support', + style: GoogleFonts.sourceSansPro( + fontSize: 14.0, + fontWeight: FontWeight.w400, + color: Color(0xFF201F1C))), + SizedBox(height: 5.0), + Text('Read More', + style: GoogleFonts.sourceSansPro( + fontSize: 14.0, + fontWeight: FontWeight.w400, + color: Color(0xFFF36F32))), + SizedBox(height: 10.0), + Container( + width: 150.0, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('200', + style: GoogleFonts.tinos( + fontSize: 25.0, + fontWeight: FontWeight.w500, + )), + Text('Review', + style: GoogleFonts.tinos( + fontSize: 15.0, + fontWeight: FontWeight.w400, + color: Color(0xFF5E5B54))), + ], + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('4', + style: GoogleFonts.tinos( + fontSize: 25.0, + fontWeight: FontWeight.w500, + )), + Text('Programs', + style: GoogleFonts.tinos( + fontSize: 15.0, + fontWeight: FontWeight.w400, + color: Color(0xFF5E5B54))), + ], + ) + ], + ), + ) + ], + ), + decoration: BoxDecoration( + color: Color(0xFFFAF6ED), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(25.0), + topRight: Radius.circular(25.0))), + ), + ), + Align( + alignment: Alignment.bottomRight, + child: Container( + height: 75.0, + width: 100.0, + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text('>', + style: GoogleFonts.sourceSansPro( + fontSize: 12.0, + fontWeight: FontWeight.w500, + color: Color(0xFFFFF2D5))), + Text('Availability', + style: GoogleFonts.sourceSansPro( + fontSize: 12.0, + fontWeight: FontWeight.w500, + color: Color(0xFFFFF2D5))), + ], + ), + ), + decoration: BoxDecoration( + borderRadius: BorderRadius.only(topLeft: Radius.circular(30.0)), + color: Color(0xFFFE6D2E) + ) + ), + ), + Align( + alignment: Alignment.topLeft, + child: Padding( + padding: EdgeInsets.only(left: 15.0, top: 30.0), + child: Container( + height: 40.0, + width: 40.0, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Color(0xFFA4B2AE) + ), + child: Center( + child: Icon(Icons.arrow_back, size: 20.0, color: Colors.white), + ), + ), + ), + ), + Align( + alignment: Alignment.topRight, + child: Padding( + padding: EdgeInsets.only(left: 15.0, top: 30.0), + child: Container( + height: 40.0, + width: 40.0, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Color(0xFFA4B2AE) + ), + child: Center( + child: Icon(Icons.favorite_border, size: 20.0, color: Colors.white), + ), + ), + ), + ), + Positioned( + top: (screenHeight - screenHeight / 3) / 2, + left: (screenWidth /2) - 75.0, + child: Container( + height: 40.0, + width: 150.0, + decoration: BoxDecoration( + color: Color(0xFFA4B2AE), + borderRadius: BorderRadius.circular(20.0) + ), + child: Center( + child: Text('Explore Programs', + style: GoogleFonts.sourceSansPro( + fontSize: 14.0, + fontWeight: FontWeight.w500, + color: Colors.white + ), + ), + ), + ), + ) + // Positioned( + // top: screenHeight - screenHeight / 3 - 45.0, + // right: 25.0, + // child: Hero( + // // tag: widget.selectInstructor.instructorPic, + // child: Container( + // height: 100.0, + // width: 100.0, + // decoration: BoxDecoration( + // image: DecorationImage( + // // image: AssetImage(widget.selectInstructor.instructorPic), + // image: AssetImage('assets/images/b.png'), + // fit: BoxFit.cover), + // borderRadius: BorderRadius.circular(15.0) + // ), + // ), + // ), + // ), + ], + )); + } +} diff --git a/lib/instructor/list_instructor.dart b/lib/instructor/list_instructor.dart new file mode 100644 index 0000000..1385b6e --- /dev/null +++ b/lib/instructor/list_instructor.dart @@ -0,0 +1,225 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_list_app/instructor/instructor_detail.dart'; +import 'package:flutter_list_app/models/instructor.dart'; +import 'package:google_fonts/google_fonts.dart'; + +class ListimstrutorPage extends StatefulWidget { + @override + _ListimstrutorPageState createState() => _ListimstrutorPageState(); +} + +class _ListimstrutorPageState extends State { + final instructors = allInstructors; + var index = 1; + List isSelected = List.generate(2, (_) => false); + + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Color(0xFFFAF6ED), + body: ListView( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + IconButton( + icon: Icon(Icons.arrow_back), + onPressed: () { + Navigator.pop(context); + } + ), + IconButton( + icon: Icon(Icons.menu), + onPressed: null, + ) + ], + ), + Padding( + padding: EdgeInsets.only(left: 15.0, right: 15.0), + child: Row( + children: [ + Text( + 'Hello World !', + style: GoogleFonts.tinos( + fontSize: 25.0, fontWeight: FontWeight.w500), + ), + IconButton( + icon: Icon(Icons.keyboard_arrow_down), + onPressed: null, + ) + ], + )), + Padding( + padding: EdgeInsets.only(left: 15.0, right: 15.0), + child: Text( + 'Flutter List Study. Lesson to ..', + style: GoogleFonts.sourceCodePro( + fontSize: 15.0, + fontWeight: FontWeight.w400, + color: Color(0xFF5E5B54)), + ), + ), + Padding( + padding: EdgeInsets.only(left: 15.0, right: 15.0), + child: TextField( + decoration: InputDecoration( + prefixIcon: IconButton( + icon: Icon(Icons.search), + onPressed: null, + ), + hintText: 'Search', + hintStyle: GoogleFonts.sourceSansPro( + fontSize: 17.0, + fontWeight: FontWeight.w400, + color: Color(0xFFF5E5B54)), + suffixIcon: IconButton( + icon: Icon(Icons.filter_list), + onPressed: null, + ), + ), + ), + ), + Container( + height: MediaQuery.of(context).size.height - 200, + child: GridView.count( + crossAxisCount: 3, + crossAxisSpacing: 1, + mainAxisSpacing: 1, + childAspectRatio: 0.67, + primary: false, + children: [ + ...instructors.map((e) { + return buildInstructorGrid(e); + }).toList() + ], + ), + ) + ], + ), + + + bottomNavigationBar: Padding( + padding: EdgeInsets.all(3.0), + child: ToggleButtons( + borderColor: Colors.white, + fillColor: Colors.white, + borderWidth: 2, + selectedBorderColor: Colors.white, + selectedColor: Colors.grey, + borderRadius: BorderRadius.circular(30), + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + '登録順', + style: TextStyle(fontSize: 16), + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + '講義別', + style: TextStyle(fontSize: 16), + ), + ), + ], + onPressed: (int index) { + setState(() { + // isSelected[index] = !isSelected[index]; + for (int i = 0; i < isSelected.length; i++) { + isSelected[i] = i == index; + } + + }); + }, + isSelected: isSelected, + ), + ), + ); + } + + //画像の背景 + buildInstructorGrid(Instructor instuctor) { + return GestureDetector( + onTap: () { + Navigator.of(context).push(MaterialPageRoute( + // builder: (context) => InstructorDetails(selectInstructor) + builder: (context) => InstructorDetails() + )); + }, + child: Padding( + padding: EdgeInsets.all(5.0), + child: Stack( + children: [ + Container(height: 150.0, + width: 100.0, + color: Colors.transparent, + ), + Positioned( + left: 30.0, + top: 65.0, + child: Container( + height: 30.0, + width: 40.0, + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + blurRadius: 7.0, + color: Colors.grey.withOpacity(0.75), + offset: Offset(5,25), + spreadRadius: 12.0 + ) + ] + ), + ), + ), + //画像を表示する + Positioned( + left: 12.0, + top: 15.0, + child: Hero( + tag: instuctor.instructorPic, + child: Container( + height: 110.0, + width: 85.0, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(7.0), + image: DecorationImage( + image: AssetImage(instuctor.instructorPic), + fit: BoxFit.cover + ) + ), + ), + ), + ), + Positioned( + left: 22.0, + top: 138.0, + child: Column( + children: [ + Text(instuctor.instructorName, + style: GoogleFonts.sourceSansPro(fontSize: 12.0), + ), + Row( + children: [ + Icon( + Icons.star, + color: Colors.grey.withOpacity(0.5), + ), + SizedBox(width: 3.0), + Text( + instuctor.rating, + style: GoogleFonts.sourceSansPro(fontSize: 11.0), + ) + ], + ) + ], + ), + ) + ], + ), + ) + ); + } +} diff --git a/lib/main.dart b/lib/main.dart index d04fa1b..d437aca 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,4 +1,13 @@ +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_list_app/card_list.dart'; +import 'package:flutter_list_app/sample.dart'; + +import 'buttomNavigation.dart'; +import 'buttomView/home.dart'; +import 'buttomView/setting.dart'; +import 'instructor/list_instructor.dart'; +import 'novel_design.dart'; void main() { runApp(MyApp()); @@ -20,9 +29,9 @@ class MyApp extends StatelessWidget { } class MyHomePage extends StatefulWidget { - MyHomePage({Key key, this.title}) : super(key: key); - + MyHomePage({Key key, this.title, this.thumbnail}) : super(key: key); final String title; + final thumbnail; @override _MyHomePageState createState() => _MyHomePageState(); @@ -32,45 +41,48 @@ class _MyHomePageState extends State { @override Widget build(BuildContext context) { - return MaterialApp( - home: Scaffold( - appBar: AppBar( - title: Text('ListViewApp'), - ), - body: ListView( - children: [ - _menueItem('メニュー1'), - _menueItem('メニュー2'), - _menueItem('メニュー3'), - _menueItem('メニュー4'), - _menueItem('メニュー5'), - _menueItem('メニュー6'), - _menueItem('メニュー7'), - ] - ), - ), - ); - } - - Widget _menueItem(String title) { - return GestureDetector( - child: Container( - padding: EdgeInsets.all(8.0), - decoration: new BoxDecoration( - border: new Border(bottom: BorderSide(width: 1.0, color: Colors.red)) - ), - child: Row( - children: [ - Text( - title, - style: TextStyle( - color: Colors.black, - fontSize: 20.0 - ) - ), - ], - ), + return CupertinoTabScaffold( + tabBar: CupertinoTabBar( + items: const [ + BottomNavigationBarItem( + icon: Icon(Icons.filter_list, color: Colors.blue), + title: Text('HOME')), + BottomNavigationBarItem( + icon: Icon(Icons.filter_list, color: Colors.blue), + title: Text('SETTING')), + BottomNavigationBarItem( + icon: Icon(Icons.filter_list, color: Colors.blue), + title: Text('TEXT')), + ], ), + tabBuilder: (context, index) { + switch (index) { + case 0: + return CupertinoTabView(builder: (context) { + return CupertinoPageScaffold( + navigationBar: CupertinoNavigationBar(// ページのヘッダ左のアイコン + ), + child: Home(), + ); + }); + case 1: + return CupertinoTabView(builder: (context) { + return CupertinoPageScaffold( + navigationBar: CupertinoNavigationBar( + ), + child: Setting(), + ); + }); + case 2: + return CupertinoTabView(builder: (context) { + return CupertinoPageScaffold( + navigationBar: CupertinoNavigationBar( + ), + child: Sample(), + ); + }); + } + }, ); } } diff --git a/lib/models/instructor.dart b/lib/models/instructor.dart new file mode 100644 index 0000000..ddf1393 --- /dev/null +++ b/lib/models/instructor.dart @@ -0,0 +1,31 @@ + +class Instructor { + String instructorName; + String rating; + String instructorPic; + + Instructor({this.instructorName, this.rating, this.instructorPic}); +} + +var allInstructors = [ + Instructor( + instructorName: 'Cora Wong', + rating: '9.95', + instructorPic: 'assets/images/a.png', + ), + Instructor( + instructorName: 'Cora Wong', + rating: '9.95', + instructorPic: 'assets/images/b.png', + ), + Instructor( + instructorName: 'Cora Wong', + rating: '9.95', + instructorPic: 'assets/images/c.png', + ), + Instructor( + instructorName: 'Cora Wong', + rating: '9.95', + instructorPic: 'assets/images/d.png', + ), +]; \ No newline at end of file diff --git a/lib/novel_design.dart b/lib/novel_design.dart new file mode 100644 index 0000000..3b87b1d --- /dev/null +++ b/lib/novel_design.dart @@ -0,0 +1,93 @@ +import 'package:flutter/material.dart'; + +import 'dashboard.dart'; + + +class NovelDesign extends StatefulWidget { + @override + _noveldesign createState() => _noveldesign(); +} + + + +class _noveldesign extends State with SingleTickerProviderStateMixin { + var selectedItem = 0; + + List children = [ + DashbordPage(), + DashbordPage(), + DashbordPage(), + DashbordPage(), + ]; + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Color(0xFF202020), + body: children[selectedItem], + bottomNavigationBar: BottomNavigationBar( + backgroundColor: Color(0xFF1B1B1B), + selectedItemColor: Color(0xFFFD4F99), + iconSize: 27.0, + currentIndex: selectedItem, + unselectedLabelStyle: TextStyle(color: Color(0xFF1B1B1B)), + unselectedItemColor: Color(0xFF888888), + onTap: (currIndex){ + setState(() { + selectedItem = currIndex; + }); + }, + items: [ + BottomNavigationBarItem( + backgroundColor: Color(0xFF1B1B1B), + icon: Icon(Icons.home), + title: Container( + height: 5.0, + width: 5.0, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Color(0xFFFD4F99) + ), + ) + ), + BottomNavigationBarItem( + backgroundColor: Color(0xFF1B1B1B), + icon: Icon(Icons.search), + title: Container( + height: 5.0, + width: 5.0, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Color(0xFFFD4F99) + ), + ) + ), + BottomNavigationBarItem( + backgroundColor: Color(0xFF1B1B1B), + icon: Icon(Icons.camera_alt), + title: Container( + height: 5.0, + width: 5.0, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Color(0xFFFD4F99) + ), + ) + ), + BottomNavigationBarItem( + backgroundColor: Color(0xFF1B1B1B), + icon: Icon(Icons.person_outline), + title: Container( + height: 5.0, + width: 5.0, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Color(0xFFFD4F99) + ), + ) + ), + ], + ), + ); + } +} \ No newline at end of file diff --git a/lib/sample.dart b/lib/sample.dart new file mode 100644 index 0000000..a29db46 --- /dev/null +++ b/lib/sample.dart @@ -0,0 +1,95 @@ +import 'package:flutter/material.dart'; + +class Sample extends StatefulWidget { + @override + _samplePage createState() => _samplePage(); +} + +class _samplePage extends State { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + body: ListView( + children: [ + Container( + height: 50, + ), + ListTile( + leading: CircleAvatar( + backgroundColor: Colors.white, + backgroundImage: AssetImage('assets/images/a.png'), + ), + title: Text( + '夏目漱石', + ), + subtitle: Text('「智に働けば角が立つ。情に棹させば流される。意地を通せば窮屈だ。兎角に人の世は住みにくい。」'), + trailing: Icon(Icons.keyboard_arrow_right), + onTap: () { + Text('Another data'); + }, + ), + Container( + height: 20, + ), + Column( + children: [ + SizedBox( // Horizontal ListView + height: 50, + child: ListView.builder( + itemCount: 3, + scrollDirection: Axis.horizontal, + itemBuilder: (context, index) { + return Container( + width: 150, + alignment: Alignment.center, + color: Colors.blue[(index % 9) * 100], + child: Text(index.toString()), + ); + }, + ), + ), + SizedBox( // Horizontal ListView + height: 200, + child: ListView.builder( + itemCount: 1, + itemBuilder: (context, index) { + return Container( + width: 50, + height: 20, + alignment: Alignment.center, + color: Colors.orange, + child: Text(index.toString()), + ); + }, + ), + ), + // Container( + // height: , + // ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Icon(Icons.star, size: 50), + Text('HelloWorld'), + Icon(Icons.star, size: 50), + ], + ), + Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Icon(Icons.star, size: 50), + Text('HelloWorld'), + Icon(Icons.star, size: 50), + ], + ) + + ] + ) + ], + ), + ), + ); + } +} + diff --git a/lib/single_scroll_screen.dart b/lib/single_scroll_screen.dart new file mode 100644 index 0000000..1493c0a --- /dev/null +++ b/lib/single_scroll_screen.dart @@ -0,0 +1,42 @@ +import 'package:flutter/material.dart'; + +class SingleChildScreen extends StatefulWidget { + @override + _singleChildScreen createState() => _singleChildScreen(); +} + +class _singleChildScreen extends State { + + final List numbers = ['今、夢を見ていた。又、会うぜ。きっと', 'は、みんなに愛されているうちに消えるのが一番良い','すべて神聖なものは夢や思い出と同じ要素から成立ち、時間', '人間は堕落する。義士も聖女も堕落する。それを防ぐことはで']; + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('Horizontal ListView'), + ), + body: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0, vertical: 24.0), + // height: MediaQuery.of(context).size.height * 0.20, + height: 150, + child: ListView.builder( + scrollDirection: Axis.horizontal, + itemCount: numbers.length, itemBuilder: (context, index) { + return Container( + width: MediaQuery.of(context).size.width * 0.6, + child: GestureDetector( + child: Card( + color: Colors.white, + child: Container( + child: Center(child: Text(numbers[index].toString(), style: TextStyle(color: Colors.black, fontSize: 15.0),)), + ), + ), + onTap: (){ + }, + ), + ); + }), + ), + ); + } +} diff --git a/lib/utiles/routes.dart b/lib/utiles/routes.dart new file mode 100644 index 0000000..083798a --- /dev/null +++ b/lib/utiles/routes.dart @@ -0,0 +1,7 @@ +import '../instructor/list_instructor.dart'; +import '../novel_design.dart'; + +Map appRoutes = { + //'/novel_design': NovelDesign(), + '/novel_design': ListimstrutorPage(), +}; \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock index ea61056..3daadc8 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -43,6 +43,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.14.13" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.5" cupertino_icons: dependency: "direct main" description: @@ -57,16 +71,65 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.0" + ffi: + dependency: transitive + description: + name: ffi + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.3" + file: + dependency: transitive + description: + name: file + url: "https://pub.dartlang.org" + source: hosted + version: "5.2.1" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + url: "https://pub.dartlang.org" + source: hosted + version: "0.19.1" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" + google_fonts: + dependency: "direct main" + description: + name: google_fonts + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.2" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.4" + intl: + dependency: transitive + description: + name: intl + url: "https://pub.dartlang.org" + source: hosted + version: "0.16.1" matcher: dependency: transitive description: @@ -88,11 +151,102 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.7.0" + path_drawing: + dependency: transitive + description: + name: path_drawing + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.1+1" + path_parsing: + dependency: transitive + description: + name: path_parsing + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" + path_provider: + dependency: transitive + description: + name: path_provider + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.22" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.1+2" + path_provider_macos: + dependency: transitive + description: + name: path_provider_macos + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.4+4" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.4+1" + pedantic: + dependency: transitive + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.0" + petitparser: + dependency: transitive + description: + name: petitparser + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.4" + platform: + dependency: transitive + description: + name: platform + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.1" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" + process: + dependency: transitive + description: + name: process + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.13" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" + smooth_star_rating: + dependency: "direct main" + description: + name: smooth_star_rating + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" source_span: dependency: transitive description: @@ -149,5 +303,27 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.8" + win32: + dependency: transitive + description: + name: win32 + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.3" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.0" + xml: + dependency: transitive + description: + name: xml + url: "https://pub.dartlang.org" + source: hosted + version: "4.5.1" sdks: dart: ">=2.9.0-14.0.dev <3.0.0" + flutter: ">=1.18.0-6.0.pre <2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 6f0fbba..ace31cd 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -28,6 +28,9 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^0.1.3 + smooth_star_rating: 1.1.1 + flutter_svg: ^0.19.1 + google_fonts: dev_dependencies: flutter_test: @@ -38,7 +41,9 @@ dev_dependencies: # The following section is specific to Flutter. flutter: - + assets: + - assets/images/ + - assets/icons/ # The following line ensures that the Material Icons font is # included with your application, so that you can use the icons in # the material Icons class.