repo_id
stringlengths
21
168
file_path
stringlengths
36
210
content
stringlengths
1
9.98M
__index_level_0__
int64
0
0
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens/details/details_screen.dart
import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; import 'package:stylish/constants.dart'; import 'package:stylish/models/Product.dart'; import 'components/color_dot.dart'; class DetailsScreen extends StatelessWidget { const DetailsScreen({Key? key, required this.product}) : super(key: key); final Product product; @override Widget build(BuildContext context) { return Scaffold( backgroundColor: product.bgColor, appBar: AppBar( leading: const BackButton(color: Colors.black), actions: [ IconButton( onPressed: () {}, icon: CircleAvatar( backgroundColor: Colors.white, child: Image.asset( "assets/images/menus.png", height: 20, ), ), ) ], ), body: Column( children: [ Image.asset( product.image, height: MediaQuery.of(context).size.height * 0.4, fit: BoxFit.cover, ), const SizedBox(height: defaultPadding * 1.5), Expanded( child: Container( padding: const EdgeInsets.fromLTRB(defaultPadding, defaultPadding * 2, defaultPadding, defaultPadding), decoration: const BoxDecoration( color: Colors.white, borderRadius: BorderRadius.only( topLeft: Radius.circular(defaultBorderRadius * 3), topRight: Radius.circular(defaultBorderRadius * 3), ), ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( children: [ Expanded( child: Text( product.title, style: Theme.of(context).textTheme.headline6, ), ), const SizedBox(width: defaultPadding), Text( "Rp" + product.price.toString(), style: const TextStyle(fontSize : 18,color: Colors.blue), ), ], ), const Padding( padding: EdgeInsets.symmetric(vertical: defaultPadding), child: Text( "Bahan Cotton, Combad 30s" " Kaos Polos bahan Cotton Combed 30s Reaktif" "bahan langsung terasa adem begitu dipakai dan ga panas lebih tipis dibanding 20s/24s" " Cocok digunakan di iklim tropis seperti Indonesia" , ), ), const SizedBox(height: defaultPadding * 3), Center( child: SizedBox( width: 250, height: 48, child: ElevatedButton( onPressed: () {}, style: ElevatedButton.styleFrom( primary: primaryColor, shape: const StadiumBorder()), child: const Text("Tambahkan Ke Keranjang"), ), ), ) ], ), ), ) ], ), ); } }
0
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens/details/header_widget.dart
// This widget will draw header section of all page. Wich you will get with the project source code. import 'package:flutter/material.dart'; class HeaderWidget extends StatefulWidget { final double _height; final bool _showIcon; final IconData _icon; const HeaderWidget(this._height, this._showIcon, this._icon, {Key? key}) : super(key: key); @override _HeaderWidgetState createState() => _HeaderWidgetState(_height, _showIcon, _icon); } class _HeaderWidgetState extends State<HeaderWidget> { double _height; bool _showIcon; IconData _icon; _HeaderWidgetState(this._height, this._showIcon, this._icon); @override Widget build(BuildContext context) { double width = MediaQuery .of(context) .size .width; return Container( child: Stack( children: [ ClipPath( child: Container( decoration: new BoxDecoration( gradient: new LinearGradient( colors: [ Theme.of(context).primaryColor.withOpacity(0.4), Theme.of(context).accentColor.withOpacity(0.4), ], begin: const FractionalOffset(0.0, 0.0), end: const FractionalOffset(1.0, 0.0), stops: [0.0, 1.0], tileMode: TileMode.clamp ), ), ), clipper: new ShapeClipper( [ Offset(width / 5, _height), Offset(width / 10 * 5, _height - 60), Offset(width / 5 * 4, _height + 20), Offset(width, _height - 18) ] ), ), ClipPath( child: Container( decoration: new BoxDecoration( gradient: new LinearGradient( colors: [ Theme.of(context).primaryColor.withOpacity(0.4), Theme.of(context).accentColor.withOpacity(0.4), ], begin: const FractionalOffset(0.0, 0.0), end: const FractionalOffset(1.0, 0.0), stops: [0.0, 1.0], tileMode: TileMode.clamp ), ), ), clipper: new ShapeClipper( [ Offset(width / 3, _height + 20), Offset(width / 10 * 8, _height - 60), Offset(width / 5 * 4, _height - 60), Offset(width, _height - 20) ] ), ), ClipPath( child: Container( decoration: new BoxDecoration( gradient: new LinearGradient( colors: [ Theme.of(context).primaryColor, Theme.of(context).accentColor, ], begin: const FractionalOffset(0.0, 0.0), end: const FractionalOffset(1.0, 0.0), stops: [0.0, 1.0], tileMode: TileMode.clamp ), ), ), clipper: new ShapeClipper( [ Offset(width / 5, _height), Offset(width / 2, _height - 40), Offset(width / 5 * 4, _height - 80), Offset(width, _height - 20) ] ), ), Visibility( visible: _showIcon, child: Container( height: _height - 40, child: Center( child: Container( margin: EdgeInsets.all(20), padding: EdgeInsets.only( left: 5.0, top: 20.0, right: 5.0, bottom: 20.0, ), decoration: BoxDecoration( // borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.only( topLeft: Radius.circular(100), topRight: Radius.circular(100), bottomLeft: Radius.circular(60), bottomRight: Radius.circular(60), ), border: Border.all(width: 5, color: Colors.white), ), child: Icon( _icon, color: Colors.white, size: 40.0, ), ), ), ), ), ], ), ); } } class ShapeClipper extends CustomClipper<Path> { List<Offset> _offsets = []; ShapeClipper(this._offsets); @override Path getClip(Size size) { var path = new Path(); path.lineTo(0.0, size.height-20); // path.quadraticBezierTo(size.width/5, size.height, size.width/2, size.height-40); // path.quadraticBezierTo(size.width/5*4, size.height-80, size.width, size.height-20); path.quadraticBezierTo(_offsets[0].dx, _offsets[0].dy, _offsets[1].dx,_offsets[1].dy); path.quadraticBezierTo(_offsets[2].dx, _offsets[2].dy, _offsets[3].dx,_offsets[3].dy); // path.lineTo(size.width, size.height-20); path.lineTo(size.width, 0.0); path.close(); return path; } @override bool shouldReclip(CustomClipper<Path> oldClipper) => false; }
0
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens/details
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens/details/components/color_dot.dart
import 'package:flutter/material.dart'; import '../../../constants.dart'; class ColorDot extends StatelessWidget { const ColorDot({ Key? key, required this.color, required this.isActive, }) : super(key: key); final Color color; final bool isActive; @override Widget build(BuildContext context) { return Container( padding: const EdgeInsets.all(defaultPadding / 4), decoration: BoxDecoration( border: Border.all(color: isActive ? primaryColor : Colors.transparent), shape: BoxShape.circle, ), child: CircleAvatar( radius: 10, backgroundColor: color, ), ); } }
0
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens/home/produk.dart
import 'package:flutter/material.dart'; class Produk extends StatefulWidget { @override _ProdukState createState() => new _ProdukState(); } class _ProdukState extends State<Produk> { @override void initState() { super.initState(); } @override Widget build(BuildContext context) { return new Scaffold( body: SafeArea( child: new Container( color: Colors.white, child: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Text('Produk'), ]), )), )); } }
0
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens/home/beranda.dart
import 'package:flutter/material.dart'; class Beranda extends StatefulWidget { @override _BerandaState createState() => new _BerandaState(); } class _BerandaState extends State<Beranda> { @override void initState() { super.initState(); } @override Widget build(BuildContext context) { return new Scaffold( body: SafeArea( child: new Container( color: Colors.white, child: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Text('Beranda'), ]), )), )); } }
0
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens/home/home_screen.dart
import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:stylish/constants.dart'; import 'components/categories.dart'; import 'components/new_arrival_products.dart'; import 'components/popular_products.dart'; import 'components/search_form.dart'; import './beranda.dart'; import './produk.dart'; import './akun.dart'; class HomeScreen extends StatefulWidget { const HomeScreen({Key? key}) : super(key: key); @override State<HomeScreen> createState() => _HomeScreenState(); } class _HomeScreenState extends State<HomeScreen> { int _currentIndex =0 ; List _pages = [ Beranda(), Produk(), ProfilePage(), ]; //fungtion void onTabTapped(int index){ setState(() { _currentIndex = index; }); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( backgroundColor: Colors.blue, title: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ Image.asset("assets/images/logoApp1.png", height: 99.0, width: 120.0, ), ] ), ), body: SingleChildScrollView( physics: const BouncingScrollPhysics( parent: AlwaysScrollableScrollPhysics()), padding: const EdgeInsets.all(defaultPadding), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ const Padding( padding: EdgeInsets.symmetric(), child: SearchForm(), ), Image.asset('assets/images/Banner.png'), const NewArrivalProducts(), const PopularProducts(), ], ), ), bottomNavigationBar: BottomNavigationBar( onTap: onTabTapped, currentIndex: _currentIndex, items: [ BottomNavigationBarItem( icon: Icon(Icons.home), label: 'Beranda', ), BottomNavigationBarItem( icon: Icon(Icons.shopping_cart), label: 'Keranjang', ), BottomNavigationBarItem( icon: Icon(Icons.person), label: 'Akun', ), ], ), ); } }
0
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens/home/akun.dart
import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:stylish/screens/details/header_widget.dart'; import 'package:stylish/screens/home/login_page.dart'; import 'registration_page.dart'; class ProfilePage extends StatefulWidget{ @override State<StatefulWidget> createState() { return _ProfilePageState(); } } class _ProfilePageState extends State<ProfilePage>{ double _drawerIconSize = 24; double _drawerFontSize = 17; @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text("Profile Page", style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold), ), elevation: 0.5, iconTheme: IconThemeData(color: Colors.white), flexibleSpace:Container( decoration: BoxDecoration( gradient: LinearGradient( begin: Alignment.topLeft, end: Alignment.bottomRight, colors: <Color>[Theme.of(context).primaryColor, Theme.of(context).accentColor,] ) ), ), actions: [ Container( margin: EdgeInsets.only( top: 16, right: 16,), child: Stack( children: <Widget>[ Icon(Icons.notifications), Positioned( right: 0, child: Container( padding: EdgeInsets.all(1), decoration: BoxDecoration( color: Colors.red, borderRadius: BorderRadius.circular(6),), constraints: BoxConstraints( minWidth: 12, minHeight: 12, ), child: Text( '5', style: TextStyle(color: Colors.white, fontSize: 8,), textAlign: TextAlign.center,), ), ) ], ), ) ], ), drawer: Drawer( child: Container( decoration:BoxDecoration( gradient: LinearGradient( begin: Alignment.topLeft, end: Alignment.bottomRight, stops: [0.0, 1.0], colors: [ Theme.of(context).primaryColor.withOpacity(0.2), Theme.of(context).accentColor.withOpacity(0.5), ] ) ) , child: ListView( children: [ DrawerHeader( decoration: BoxDecoration( color: Theme.of(context).primaryColor, gradient: LinearGradient( begin: Alignment.topLeft, end: Alignment.bottomRight, stops: [0.0, 1.0], colors: [ Theme.of(context).primaryColor,Theme.of(context).accentColor,], ), ), child: Container( alignment: Alignment.bottomLeft, child: Text("FlutterTutorial.Net", style: TextStyle(fontSize: 25,color: Colors.white, fontWeight: FontWeight.bold), ), ), ), ListTile( leading: Icon(Icons.login_rounded,size: _drawerIconSize,color: Theme.of(context).accentColor), title: Text('Login Page', style: TextStyle(fontSize: _drawerFontSize, color: Theme.of(context).accentColor), ), onTap: () { Navigator.push(context, MaterialPageRoute(builder: (context) => LoginPage()),); }, ), Divider(color: Theme.of(context).primaryColor, height: 1,), ListTile( leading: Icon(Icons.person_add_alt_1, size: _drawerIconSize,color: Theme.of(context).accentColor), title: Text('Registration Page',style: TextStyle(fontSize: _drawerFontSize,color: Theme.of(context).accentColor),), onTap: () { Navigator.push(context, MaterialPageRoute(builder: (context) => RegistrationPage()),); }, ), Divider(color: Theme.of(context).primaryColor, height: 1,), ListTile( leading: Icon(Icons.logout_rounded, size: _drawerIconSize,color: Theme.of(context).accentColor,), title: Text('Logout',style: TextStyle(fontSize: _drawerFontSize,color: Theme.of(context).accentColor),), onTap: () { SystemNavigator.pop(); }, ), ], ), ), ), body: SingleChildScrollView( child: Stack( children: [ Container(height: 100, child: HeaderWidget(100,false,Icons.house_rounded),), Container( alignment: Alignment.center, margin: EdgeInsets.fromLTRB(25, 10, 25, 10), padding: EdgeInsets.fromLTRB(10, 0, 10, 0), child: Column( children: [ Container( padding: EdgeInsets.all(10), decoration: BoxDecoration( borderRadius: BorderRadius.circular(100), border: Border.all(width: 5, color: Colors.white), color: Colors.white, boxShadow: [ BoxShadow(color: Colors.black12, blurRadius: 20, offset: const Offset(5, 5),), ], ), child: Icon(Icons.person, size: 80, color: Colors.grey.shade300,), ), SizedBox(height: 20,), Text('Mr. Donald Trump', style: TextStyle(fontSize: 22, fontWeight: FontWeight.bold),), SizedBox(height: 20,), Text('Former President', style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),), SizedBox(height: 10,), Container( padding: EdgeInsets.all(10), child: Column( children: <Widget>[ Container( padding: const EdgeInsets.only(left: 8.0, bottom: 4.0), alignment: Alignment.topLeft, child: Text( "User Information", style: TextStyle( color: Colors.black87, fontWeight: FontWeight.w500, fontSize: 16, ), textAlign: TextAlign.left, ), ), Card( child: Container( alignment: Alignment.topLeft, padding: EdgeInsets.all(15), child: Column( children: <Widget>[ Column( children: <Widget>[ ...ListTile.divideTiles( color: Colors.grey, tiles: [ ListTile( contentPadding: EdgeInsets.symmetric( horizontal: 12, vertical: 4), leading: Icon(Icons.my_location), title: Text("Location"), subtitle: Text("USA"), ), ListTile( leading: Icon(Icons.email), title: Text("Email"), subtitle: Text("[email protected]"), ), ListTile( leading: Icon(Icons.phone), title: Text("Phone"), subtitle: Text("99--99876-56"), ), ListTile( leading: Icon(Icons.person), title: Text("About Me"), subtitle: Text( "This is a about me link and you can khow about me in this section."), ), ], ), ], ) ], ), ), ) ], ), ) ], ), ) ], ), ), ); } }
0
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens/home/registration_page.dart
import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:stylish/models/theme_helper.dart'; import 'package:stylish/screens/details/header_widget.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:stylish/screens/home/home_screen.dart'; import 'akun.dart'; class RegistrationPage extends StatefulWidget{ @override State<StatefulWidget> createState() { return _RegistrationPageState(); } } class _RegistrationPageState extends State<RegistrationPage>{ final _formKey = GlobalKey<FormState>(); bool checkedValue = false; bool checkboxValue = false; @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, body: SingleChildScrollView( child: Stack( children: [ Container( height: 150, child: HeaderWidget(150, false, Icons.person_add_alt_1_rounded), ), Container( margin: EdgeInsets.fromLTRB(25, 50, 25, 10), padding: EdgeInsets.fromLTRB(10, 0, 10, 0), alignment: Alignment.center, child: Column( children: [ Form( key: _formKey, child: Column( children: [ GestureDetector( child: Stack( children: [ Container( padding: EdgeInsets.all(10), decoration: BoxDecoration( borderRadius: BorderRadius.circular(100), border: Border.all( width: 5, color: Colors.white), color: Colors.white, boxShadow: [ BoxShadow( color: Colors.black12, blurRadius: 20, offset: const Offset(5, 5), ), ], ), child: Icon( Icons.person, color: Colors.grey.shade300, size: 80.0, ), ), Container( padding: EdgeInsets.fromLTRB(80, 80, 0, 0), child: Icon( Icons.add_circle, color: Colors.grey.shade700, size: 25.0, ), ), ], ), ), SizedBox(height: 30,), Container( child: TextFormField( decoration: ThemeHelper().textInputDecoration('First Name', 'Enter your first name'), ), decoration: ThemeHelper().inputBoxDecorationShaddow(), ), SizedBox(height: 30,), Container( child: TextFormField( decoration: ThemeHelper().textInputDecoration('Last Name', 'Enter your last name'), ), decoration: ThemeHelper().inputBoxDecorationShaddow(), ), SizedBox(height: 20.0), Container( child: TextFormField( decoration: ThemeHelper().textInputDecoration("E-mail address", "Enter your email"), keyboardType: TextInputType.emailAddress, validator: (val) { if(!(val!.isEmpty) && !RegExp(r"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,253}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,253}[a-zA-Z0-9])?)*$").hasMatch(val)){ return "Enter a valid email address"; } return null; }, ), decoration: ThemeHelper().inputBoxDecorationShaddow(), ), SizedBox(height: 20.0), Container( child: TextFormField( decoration: ThemeHelper().textInputDecoration( "Mobile Number", "Enter your mobile number"), keyboardType: TextInputType.phone, validator: (val) { if(!(val!.isEmpty) && !RegExp(r"^(\d+)*$").hasMatch(val)){ return "Enter a valid phone number"; } return null; }, ), decoration: ThemeHelper().inputBoxDecorationShaddow(), ), SizedBox(height: 20.0), Container( child: TextFormField( obscureText: true, decoration: ThemeHelper().textInputDecoration( "Password*", "Enter your password"), validator: (val) { if (val!.isEmpty) { return "Please enter your password"; } return null; }, ), decoration: ThemeHelper().inputBoxDecorationShaddow(), ), SizedBox(height: 15.0), FormField<bool>( builder: (state) { return Column( children: <Widget>[ Row( children: <Widget>[ Checkbox( value: checkboxValue, onChanged: (value) { setState(() { checkboxValue = value!; state.didChange(value); }); }), Text("I accept all terms and conditions.", style: TextStyle(color: Colors.grey),), ], ), Container( alignment: Alignment.centerLeft, child: Text( state.errorText ?? '', textAlign: TextAlign.left, style: TextStyle(color: Theme.of(context).errorColor,fontSize: 12,), ), ) ], ); }, validator: (value) { if (!checkboxValue) { return 'You need to accept terms and conditions'; } else { return null; } }, ), SizedBox(height: 20.0), Container( decoration: ThemeHelper().buttonBoxDecoration(context), child: ElevatedButton( style: ThemeHelper().buttonStyle(), child: Padding( padding: const EdgeInsets.fromLTRB(40, 10, 40, 10), child: Text( "Register".toUpperCase(), style: TextStyle( fontSize: 20, fontWeight: FontWeight.bold, color: Colors.white, ), ), ), onPressed: () { if (_formKey.currentState!.validate()) { Navigator.of(context).pushAndRemoveUntil( MaterialPageRoute( builder: (context) => HomeScreen() ), (Route<dynamic> route) => false ); } }, ), ), SizedBox(height: 30.0), Text("Or create account using social media", style: TextStyle(color: Colors.grey),), SizedBox(height: 25.0), Row( mainAxisAlignment: MainAxisAlignment.center, children: [ GestureDetector( child: FaIcon( FontAwesomeIcons.googlePlus, size: 35, color: HexColor("#EC2D2F"),), onTap: () { setState(() { showDialog( context: context, builder: (BuildContext context) { return ThemeHelper().alartDialog("Google Plus","You tap on GooglePlus social icon.",context); }, ); }); }, ), SizedBox(width: 30.0,), GestureDetector( child: Container( padding: EdgeInsets.all(0), decoration: BoxDecoration( borderRadius: BorderRadius.circular(100), border: Border.all(width: 5, color: HexColor("#40ABF0")), color: HexColor("#40ABF0"), ), child: FaIcon( FontAwesomeIcons.twitter, size: 23, color: HexColor("#FFFFFF"),), ), onTap: () { setState(() { showDialog( context: context, builder: (BuildContext context) { return ThemeHelper().alartDialog("Twitter","You tap on Twitter social icon.",context); }, ); }); }, ), SizedBox(width: 30.0,), GestureDetector( child: FaIcon( FontAwesomeIcons.facebook, size: 35, color: HexColor("#3E529C"),), onTap: () { setState(() { showDialog( context: context, builder: (BuildContext context) { return ThemeHelper().alartDialog("Facebook", "You tap on Facebook social icon.", context); }, ); }); }, ), ], ), ], ), ), ], ), ), ], ), ), ); } }
0
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens/home/login_page.dart
import 'package:flutter/cupertino.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:stylish/models/theme_helper.dart'; import 'package:stylish/screens/home/home_screen.dart'; import 'akun.dart'; import 'registration_page.dart'; import 'package:stylish/screens/details/header_widget.dart'; class LoginPage extends StatefulWidget{ const LoginPage({Key? key}): super(key:key); @override _LoginPageState createState() => _LoginPageState(); } class _LoginPageState extends State<LoginPage>{ double _headerHeight = 250; Key _formKey = GlobalKey<FormState>(); @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, body: SingleChildScrollView( child: Column( children: [ Container( height: _headerHeight, child: HeaderWidget(_headerHeight, true, Icons.login_rounded), //let's create a common header widget ), SafeArea( child: Container( padding: EdgeInsets.fromLTRB(20, 10, 20, 10), margin: EdgeInsets.fromLTRB(20, 10, 20, 10),// This will be the login form child: Column( children: [ Text( 'Hello', style: TextStyle(fontSize: 60, fontWeight: FontWeight.bold), ), Text( 'Signin into your account', style: TextStyle(color: Colors.grey), ), SizedBox(height: 30.0), Form( key: _formKey, child: Column( children: [ Container( child: TextField( decoration: ThemeHelper().textInputDecoration('User Name', 'Enter your user name'), ), decoration: ThemeHelper().inputBoxDecorationShaddow(), ), SizedBox(height: 30.0), Container( child: TextField( obscureText: true, decoration: ThemeHelper().textInputDecoration('Password', 'Enter your password'), ), decoration: ThemeHelper().inputBoxDecorationShaddow(), ), Container( decoration: ThemeHelper().buttonBoxDecoration(context), child: ElevatedButton( style: ThemeHelper().buttonStyle(), child: Padding( padding: EdgeInsets.fromLTRB(40, 10, 40, 10), child: Text('Sign In'.toUpperCase(), style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold, color: Colors.white),), ), onPressed: (){ //After successful login we will redirect to profile page. Let's create profile page now Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) => HomeScreen())); }, ), ), Container( margin: EdgeInsets.fromLTRB(10,20,10,20), //child: Text('Don\'t have an account? Create'), child: Text.rich( TextSpan( children: [ TextSpan(text: "Don\'t have an account? "), TextSpan( text: 'Create', recognizer: TapGestureRecognizer() ..onTap = (){ Navigator.push(context, MaterialPageRoute(builder: (context) => RegistrationPage())); }, style: TextStyle(fontWeight: FontWeight.bold, color: Theme.of(context).accentColor), ), ] ) ), ), ], ) ), ], ) ), ), ], ), ), ); } }
0
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens/home
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens/home/components/new_arrival_products.dart
import 'package:flutter/material.dart'; import 'package:stylish/models/Product.dart'; import 'package:stylish/screens/details/details_screen.dart'; import '../../../constants.dart'; import 'product_card.dart'; import 'section_title.dart'; class NewArrivalProducts extends StatelessWidget { const NewArrivalProducts({ Key? key, }) : super(key: key); @override Widget build(BuildContext context) { return Column( children: [ Padding( padding: const EdgeInsets.symmetric(vertical: defaultPadding), child: SectionTitle( title: "Terbaru", pressSeeAll: () {}, ), ), SingleChildScrollView( physics: const BouncingScrollPhysics( parent: AlwaysScrollableScrollPhysics()), scrollDirection: Axis.horizontal, child: Row( children: List.generate( demo_product.length, (index) => Padding( padding: const EdgeInsets.only(right: defaultPadding), child: ProductCard( title: demo_product[index].title, image: demo_product[index].image, price: demo_product[index].price, bgColor: demo_product[index].bgColor, press: () { Navigator.push( context, MaterialPageRoute( builder: (context) => DetailsScreen(product: demo_product[index]), )); }, ), ), ), ), ) ], ); } }
0
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens/home
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens/home/components/popular_products.dart
import 'package:flutter/material.dart'; import 'package:stylish/models/Product.dart'; import '../../../constants.dart'; import 'product_card.dart'; import 'section_title.dart'; class PopularProducts extends StatelessWidget { const PopularProducts({ Key? key, }) : super(key: key); @override Widget build(BuildContext context) { return Column( children: [ Padding( padding: const EdgeInsets.symmetric(vertical: defaultPadding), child: SectionTitle( title: "Super Promo", pressSeeAll: () {}, ), ), SingleChildScrollView( physics: const BouncingScrollPhysics( parent: AlwaysScrollableScrollPhysics()), scrollDirection: Axis.horizontal, child: Row( children: List.generate( demo_product.length, (index) => Padding( padding: const EdgeInsets.only(right: defaultPadding), child: ProductCard( title: demo_product[index].title, image: demo_product[index].image, price: demo_product[index].price, bgColor: demo_product[index].bgColor, press: () {}, ), ), ), ), ) ], ); } }
0
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens/home
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens/home/components/section_title.dart
import 'package:flutter/material.dart'; class SectionTitle extends StatelessWidget { const SectionTitle({ Key? key, required this.title, required this.pressSeeAll, }) : super(key: key); final String title; final VoidCallback pressSeeAll; @override Widget build(BuildContext context) { return Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( title, style: Theme.of(context).textTheme.subtitle1!.copyWith( color: Colors.black, fontWeight: FontWeight.w500, ), ), TextButton( onPressed: pressSeeAll, child: const Text( "Lihat Semua", style: TextStyle(color: Colors.black54), ), ) ], ); } }
0
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens/home
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens/home/components/product_card.dart
import 'package:flutter/material.dart'; import '../../../constants.dart'; class ProductCard extends StatelessWidget { const ProductCard({ Key? key, required this.image, required this.title, required this.price, required this.press, required this.bgColor, }) : super(key: key); final String image, title; final VoidCallback press; final int price; final Color bgColor; @override Widget build(BuildContext context) { return GestureDetector( onTap: press, child: Container( width: 154, padding: const EdgeInsets.all(defaultPadding / 2), decoration: const BoxDecoration( color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(defaultBorderRadius)), ), child: Column( children: [ Container( width: double.infinity, decoration: BoxDecoration( color: bgColor, borderRadius: const BorderRadius.all( Radius.circular(defaultBorderRadius)), ), child: Image.asset( image, height: 132, ), ), const SizedBox(height: defaultPadding / 2), Row( children: [ Expanded( child: Text( title, style: const TextStyle(color: Colors.black), ), ), const SizedBox(width: defaultPadding / 4), Text( "Rp" + price.toString(), style: const TextStyle(color: Colors.blue), ), ], ) ], ), ), ); } }
0
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens/home
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens/home/components/search_form.dart
import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import '../../../constants.dart'; const OutlineInputBorder outlineInputBorder = OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(12)), borderSide: BorderSide.none, ); class SearchForm extends StatelessWidget { const SearchForm({ Key? key, }) : super(key: key); @override Widget build(BuildContext context) { return Form( child: TextFormField( onSaved: (value) {}, decoration: InputDecoration( filled: true, fillColor: Colors.white, hintText: "Cari Produk...", border: outlineInputBorder, enabledBorder: outlineInputBorder, focusedBorder: outlineInputBorder, errorBorder: outlineInputBorder, prefixIcon: Padding( padding: const EdgeInsets.all(14), child: SvgPicture.asset("assets/icons/Search.svg"), ), suffixIcon: Padding( padding: const EdgeInsets.symmetric( horizontal: defaultPadding, vertical: defaultPadding / 2), child: SizedBox( width: 48, height: 48, ), ), ), ), ); } }
0
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens/home
mirrored_repositories/Viasty-App-PKM-2022-/lib/screens/home/components/categories.dart
import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:stylish/models/Category.dart'; import '../../../constants.dart'; class Categories extends StatelessWidget { const Categories({ Key? key, }) : super(key: key); @override Widget build(BuildContext context) { return SizedBox( height: 84, child: ListView.separated( scrollDirection: Axis.horizontal, itemCount: demo_categories.length, itemBuilder: (context, index) => CategoryCard( icon: demo_categories[index].icon, title: demo_categories[index].title, press: () {}, ), separatorBuilder: (context, index) => const SizedBox(width: defaultPadding), ), ); } } class CategoryCard extends StatelessWidget { const CategoryCard({ Key? key, required this.icon, required this.title, required this.press, }) : super(key: key); final String icon, title; final VoidCallback press; @override Widget build(BuildContext context) { return OutlinedButton( onPressed: press, style: OutlinedButton.styleFrom( shape: const RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(defaultBorderRadius)), ), ), child: Padding( padding: const EdgeInsets.symmetric( vertical: defaultPadding / 2, horizontal: defaultPadding / 4), child: Column( children: [ SvgPicture.asset(icon), const SizedBox(height: defaultPadding / 2), Text( title, style: Theme.of(context).textTheme.subtitle2, ) ], ), ), ); } }
0
mirrored_repositories/Viasty-App-PKM-2022-
mirrored_repositories/Viasty-App-PKM-2022-/test/widget_test.dart
// This is a basic Flutter widget test. // // To perform an interaction with a widget in your test, use the WidgetTester // utility that Flutter provides. For example, you can send tap and scroll // gestures. You can also use WidgetTester to find child widgets in the widget // tree, read text, and verify that the values of widget properties are correct. import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:stylish/main.dart'; void main() { testWidgets('Counter increments smoke test', (WidgetTester tester) async { // Build our app and trigger a frame. await tester.pumpWidget(const MyApp()); // Verify that our counter starts at 0. expect(find.text('0'), findsOneWidget); expect(find.text('1'), findsNothing); // Tap the '+' icon and trigger a frame. await tester.tap(find.byIcon(Icons.add)); await tester.pump(); // Verify that our counter has incremented. expect(find.text('0'), findsNothing); expect(find.text('1'), findsOneWidget); }); }
0
mirrored_repositories/Newsella
mirrored_repositories/Newsella/lib/PageModels.dart
import 'package:flutter/material.dart'; class PageModel { String _images; String _title; String _description; IconData _icons; PageModel(this._images, this._title, this._description, this._icons); IconData get icons => _icons; String get description => _description; String get title => _title; String get images => _images; }
0
mirrored_repositories/Newsella
mirrored_repositories/Newsella/lib/main.dart
import 'package:flutter/material.dart'; import 'package:news_application/Screens/WelcomePage.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'Screens/HomeScreen.dart'; import 'Utilities/ThemeData.dart'; void main() async{ //Due To Flutter Update we need to type this line when we use async in main WidgetsFlutterBinding.ensureInitialized(); SharedPreferences prefs = await SharedPreferences.getInstance(); bool seen = prefs.getBool('seen'); Widget _screen ; if(seen == null || seen==false) { _screen = WelcomePage(); } else{ _screen = HomeScreen(); } runApp(NewsApp(_screen)); } class NewsApp extends StatelessWidget { final Widget _screen; NewsApp(this._screen); @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, home: this._screen , theme: AppTheme.apptheme, ); } }
0
mirrored_repositories/Newsella/lib
mirrored_repositories/Newsella/lib/HomeScreens/What'sNew.dart
import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; class WhatsNew extends StatefulWidget { @override _WhatsNewState createState() => _WhatsNewState(); } class _WhatsNewState extends State<WhatsNew> { @override Widget build(BuildContext context) { return SingleChildScrollView( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ _drawHeader(), _drawTopStories(), ], ), ); } Widget _drawHeader() { TextStyle _headerStyle = TextStyle( color: Colors.white, fontSize: 22, fontWeight: FontWeight.w600); TextStyle _descriptionStyle = TextStyle( color: Colors.white, fontSize: 16, ); return Container( width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.height * 0.25, decoration: BoxDecoration( image: DecorationImage( image: ExactAssetImage('assets/images/hs.jpg'), fit: BoxFit.cover, ), ), child: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Padding( padding: EdgeInsets.only(left: 64, right: 64), child: Text( "Real Madrid Wins The Match In Camp nau", style: _headerStyle, textAlign: TextAlign.center, ), ), Padding( padding: EdgeInsets.only(left: 34, right: 34), child: Text( 'Benzema Scores Two Goals , tab here to read more information', style: _descriptionStyle, textAlign: TextAlign.center, ), ) ], ), ), ); } Widget _drawTopStories() { return Container( color: Colors.grey.shade100, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( padding: EdgeInsets.only(left: 16, top: 16), child: _drawSectionTitles('Top Stories'), ), Padding( padding: EdgeInsets.all(8.0), child: Card( child: Column( children: [ _drawSingleRow(), _drawDivider(), _drawSingleRow(), _drawDivider(), _drawSingleRow(), ], ), ), ), Padding( padding: EdgeInsets.all(8.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( child: _drawSectionTitles("Recent Updates"), padding: EdgeInsets.only(left: 16 , bottom: 8), ), _drawRecentUpdateCards(Colors.deepOrange), _drawRecentUpdateCards(Colors.teal), SizedBox( height: 48, ) ], ), ), ], ), ); } Widget _drawSingleRow() { return Padding( padding: EdgeInsets.all(8.0), child: Row( children: [ SizedBox( child: Image( image: ExactAssetImage('assets/images/hs.jpg'), fit: BoxFit.cover, ), height: 125, width: 125, ), SizedBox( width: 16, ), Expanded( child: Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( 'Al-Ahly beats El-Wedad in Moroco 3-0 , in a hard match', style: TextStyle(fontSize: 18, fontWeight: FontWeight.w600), ), SizedBox( height: 18, ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text('Ahmed Ihab'), Row( children: [ Icon(Icons.timer), Text("15min"), ], ), ], ), ], ), ), ], ), ); } Widget _drawDivider() { return Container( height: 1, width: double.infinity, color: Colors.grey.shade100, ); } Widget _drawSectionTitles(String title) { return Text( title, style: TextStyle( color: Colors.grey.shade700, fontWeight: FontWeight.w600, ), ); } Widget _drawRecentUpdateCards(Color color) { return Card( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( decoration: BoxDecoration( image: DecorationImage(image: ExactAssetImage('assets/images/hs.jpg'),fit: BoxFit.cover), ), width: double.infinity, height: MediaQuery.of(context).size.height *0.25, ), Padding( padding: EdgeInsets.only(left: 16 ,top: 16), child: Container( padding: EdgeInsets.only(left: 24 , right: 24 , top: 2 , bottom: 2), decoration: BoxDecoration( color: color, borderRadius: BorderRadius.circular(4), ), child: Text('SPORT' , style: TextStyle(color: Colors.white, fontWeight: FontWeight.w500),), ), ), Padding( padding: EdgeInsets.only(left: 16 , top: 8 , bottom: 8), child: Text('Liverpool VS Everton Today', style: TextStyle( fontSize: 18, fontWeight: FontWeight.w600 ), ), ), Padding( padding: EdgeInsets.only(left: 12 , bottom: 8), child: Row( children: [ Icon(Icons.timer , color: Colors.grey,), SizedBox( width: 6, ), Text("15min" , style: TextStyle(color: Colors.grey , fontSize: 16)) ], ), ), ], ), ); } }
0
mirrored_repositories/Newsella/lib
mirrored_repositories/Newsella/lib/HomeScreens/Favourites.dart
import 'dart:math'; import 'package:flutter/material.dart'; class Favourites extends StatefulWidget { @override _FavouritesState createState() => _FavouritesState(); } class _FavouritesState extends State<Favourites> { List<Color> color = [ Colors.red, Colors.teal, Colors.deepOrange, Colors.cyan, Colors.amber, Colors.indigo ]; Random random = Random(); Color _getRandomColor() { return color[random.nextInt(color.length)]; } @override Widget build(BuildContext context) { return ListView.builder( itemBuilder: (context, position) { return Card( child: Container( padding: EdgeInsets.all(16), child: Column( children: [ _authorRow(), SizedBox( height: 16, ), _newsRow(), ], ), ), ); }, itemCount: 20, ); } Widget _authorRow() { return Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Row( children: [ Container( decoration: BoxDecoration( image: DecorationImage( image: ExactAssetImage('assets/images/hs.jpg'), fit: BoxFit.cover), shape: BoxShape.circle), width: 50, height: 50, margin: EdgeInsets.only(right: 16), ), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( "Ahmed Ihab", style: TextStyle(color: Colors.grey), ), SizedBox( height: 8, ), Row( children: [ Text('15min .', style: TextStyle(color: Colors.grey)), SizedBox( width: 3, ), Text( 'LifeStyle', style: TextStyle(color: _getRandomColor()), ) ], ), ], ), ], ), IconButton( icon: Icon( Icons.bookmark_border, color: Colors.grey, ), onPressed: () {}) ], ); } Widget _newsRow() { return Row( children: [ Container( decoration: BoxDecoration( image: DecorationImage(image: ExactAssetImage('assets/images/hs.jpg'),fit: BoxFit.cover), ), width: 124, height: 124, margin: EdgeInsets.only(right: 16), ), Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text('Here will be the news title ', style: TextStyle(fontWeight: FontWeight.w600 , fontSize: 16), ), Text('and here will be an abstract about the topic you are interested in', style: TextStyle(color: Colors.grey , fontSize: 16 , height: 1.25), ) ], ), ), ], ); } }
0
mirrored_repositories/Newsella/lib
mirrored_repositories/Newsella/lib/HomeScreens/Popular.dart
import 'package:flutter/material.dart'; class Popular extends StatefulWidget { @override _PopularState createState() => _PopularState(); } class _PopularState extends State<Popular> { @override Widget build(BuildContext context) { return ListView.builder(itemBuilder: (context , position){ return Card( child: _drawSingleRow(), ); }, itemCount: 20, ); } Widget _drawSingleRow() { return Padding( padding: EdgeInsets.all(8.0), child: Row( children: [ SizedBox( child: Image( image: ExactAssetImage('assets/images/hs.jpg'), fit: BoxFit.cover, ), height: 125, width: 125, ), SizedBox( width: 16, ), Expanded( child: Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( 'Al-Ahly beats El-Wedad in Moroco 3-0 , in a hard match', style: TextStyle(fontSize: 18, fontWeight: FontWeight.w600), ), SizedBox( height: 18, ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text('Ahmed Ihab'), Row( children: [ Icon(Icons.timer), Text("15min"), ], ), ], ), ], ), ), ], ), ); } }
0
mirrored_repositories/Newsella/lib
mirrored_repositories/Newsella/lib/Shared_UI/Drawer_.dart
import 'package:flutter/material.dart'; import 'package:news_application/Screens/HeadlineNews.dart'; import 'package:news_application/Screens/HomeScreen.dart'; import 'package:news_application/Screens/TwitterFeed.dart'; import 'package:news_application/Shared_UI/nav_menu.dart'; class DrawerNavigator extends StatefulWidget { @override _DrawerNavigatorState createState() => _DrawerNavigatorState(); } class _DrawerNavigatorState extends State<DrawerNavigator> { List<NavMenuItem> navMenuItems = [ NavMenuItem('Explore', ()=>HomeScreen()), NavMenuItem('Headline News', ()=>HeadlineNews()), NavMenuItem('Twitter Feed', ()=>TwitterFeed()) ]; List<String> navMenu=[ 'Explore', 'Headline News', 'Read Later', 'Videos', 'Photos', 'Settings', 'Logout' ]; @override Widget build(BuildContext context) { return Drawer( child: Padding( padding: EdgeInsets.only(top: 75 , left: 20), child: ListView.builder(itemBuilder: (context , position){ return ListTile( title: Text(navMenuItems[position].title , style: TextStyle(fontSize: 18),), trailing: Icon(Icons.chevron_right), onTap: (){ Navigator.pop(context); Navigator.push(context, MaterialPageRoute(builder: (context){ return navMenuItems[position].route(); })); }, ); }, itemCount: navMenuItems.length,), ), ); } }
0
mirrored_repositories/Newsella/lib
mirrored_repositories/Newsella/lib/Shared_UI/nav_menu.dart
class NavMenuItem { String title; //We defined route as a Function because of when we create a List of NavMenuItem //We don't want the class to be created .. only when i call him when we click on the name :)) Function route; NavMenuItem(this.title , this.route); }
0
mirrored_repositories/Newsella/lib
mirrored_repositories/Newsella/lib/Screens/TwitterFeed.dart
import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:news_application/Shared_UI/Drawer_.dart'; class TwitterFeed extends StatefulWidget { @override _TwitterFeedState createState() => _TwitterFeedState(); } class _TwitterFeedState extends State<TwitterFeed> { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('Twitter Feed'), actions: [ IconButton(icon: Icon(Icons.search), onPressed: (){}) ], ), drawer: DrawerNavigator(), body: ListView.builder(itemBuilder: (context , position){ return Card( child: Column( children: [ _drawHead(), _drawBody(), _drawFooter(), ], ), ); }, itemCount: 20, ) ); } Widget _drawHead() { return Padding( padding: const EdgeInsets.all(12.0), child: Row( children: [ CircleAvatar( backgroundImage: ExactAssetImage('assets/images/hs.jpg'), radius: 24, ), SizedBox(width: 8,), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( children: [ Text('Ahmed Ihab'), SizedBox(width: 3,), Text("@ahmed.ihab" , style: TextStyle(color: Colors.grey),) ], ), SizedBox( height: 4, ), Text('Fri , 12 Sep 2020 . 1.30', style: TextStyle(color: Colors.grey)), ], ) ], ), ); } Widget _drawBody() { return Padding( padding: EdgeInsets.only(left: 20 , right: 20 , bottom: 8), child: Text("Here the tweet content will appear to the user after we bring it from API"), ); } Widget _drawFooter() { return Padding( padding: const EdgeInsets.only(left: 12 , bottom: 8 , right: 12), child: Row( children: [ IconButton(icon: Icon(Icons.repeat , color: Colors.orangeAccent,), onPressed: (){}), Text('25'), Spacer( flex: 1, ), Row( children: [ FlatButton(onPressed: (){}, child: Text('SHARE' , style: TextStyle(color: Colors.orangeAccent),)), FlatButton(onPressed: (){}, child: Text('OPEN', style: TextStyle(color: Colors.orangeAccent))), ], ), ], ), ); } }
0
mirrored_repositories/Newsella/lib
mirrored_repositories/Newsella/lib/Screens/WelcomePage.dart
import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:news_application/Screens/HomeScreen.dart'; import 'package:shared_preferences/shared_preferences.dart'; import '../PageModels.dart'; import 'package:page_view_indicator/page_view_indicator.dart'; class WelcomePage extends StatefulWidget { @override _WelcomePageState createState() => _WelcomePageState(); } class _WelcomePageState extends State<WelcomePage> { List<PageModel> pages; ValueNotifier<int> _valueNotifier = ValueNotifier(0); void _setPages() { pages = List<PageModel>(); pages.add(PageModel( 'assets/images/bg9.jpg', 'Welcome!', "Making friends is easy as waving your hand back and forth in easy step", Icons.all_inclusive)); pages.add(PageModel('assets/images/bg.jpg', 'Be in touch', 'Read about all what you want ', Icons.attachment)); pages.add(PageModel('assets/images/bg7.jpg', 'Know', "What happens around you ", Icons.group)); pages.add(PageModel('assets/images/bg4.jpg', "Enjoy", "and give us your feedback ", Icons.feedback)); } @override Widget build(BuildContext context) { _setPages(); return Scaffold( body: Stack( children: <Widget>[ PageView.builder( itemBuilder: (context, index) { return Stack( children: <Widget>[ Container( decoration: BoxDecoration( image: DecorationImage( image: ExactAssetImage( pages[index].images, ), fit: BoxFit.cover)), ), Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Transform.translate( child: Icon( pages[index].icons, size: 140, color: Colors.white, ), offset: Offset(0, -100), ), Text( pages[index].title, style: TextStyle( fontWeight: FontWeight.bold, color: Colors.white, fontSize: 28), textAlign: TextAlign.center, ), Padding( padding: const EdgeInsets.only(left: 48, right: 48, top: 18), child: Text( pages[index].description, style: TextStyle(color: Colors.grey[350], fontSize: 16, fontWeight: FontWeight.w900, letterSpacing: 1.2), textAlign: TextAlign.center, ), ), ], ) ], ); }, itemCount: pages.length, onPageChanged: (index){ _valueNotifier.value = index; }, ), Transform.translate( offset: Offset(0, 165), child: Align( alignment: Alignment.center, child: _displayPageIndicators(pages.length), ), ), Align( alignment: Alignment.bottomCenter, child: Padding( padding: const EdgeInsets.only(bottom: 28, left: 16, right: 16), child: SizedBox( width: double.infinity, height: 50, child: RaisedButton( color: Colors.red[800], child: Text( "GET STARTED", style: TextStyle( color: Colors.white, fontSize: 16, letterSpacing: 1), ), onPressed: () { Navigator.push(context, MaterialPageRoute(builder: (context){ _updateSeen(); return HomeScreen(); })); }, ), ), ), ) ], ), ); } Widget _displayPageIndicators(int length) { return PageViewIndicator( pageIndexNotifier: _valueNotifier, length: length, normalBuilder: (animationController, index) => Circle( size: 8.0, color: Colors.grey, ), highlightedBuilder: (animationController, index) => ScaleTransition( scale: CurvedAnimation( parent: animationController, curve: Curves.ease, ), child: Circle( size: 12.0, color: Colors.red, ), ), ); } void _updateSeen() async{ SharedPreferences prefs = await SharedPreferences.getInstance(); prefs.setBool('seen', true); } }
0
mirrored_repositories/Newsella/lib
mirrored_repositories/Newsella/lib/Screens/HeadlineNews.dart
import 'package:flutter/material.dart'; import 'package:news_application/HomeScreens/Favourites.dart'; import 'package:news_application/HomeScreens/Popular.dart'; import 'package:news_application/HomeScreens/What\'sNew.dart'; import 'package:news_application/Shared_UI/Drawer_.dart'; class HeadlineNews extends StatefulWidget { @override _HeadlineNewsState createState() => _HeadlineNewsState(); } class _HeadlineNewsState extends State<HeadlineNews> with TickerProviderStateMixin { TabController _tabController; @override void initState() { super.initState(); _tabController = TabController(initialIndex:0,length: 3, vsync: this); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text("Headline News"), centerTitle: false, actions:<Widget> [ IconButton(icon: Icon(Icons.search ), onPressed:(){}), IconButton(icon: Icon(Icons.more_vert), onPressed: (){}) ], bottom: TabBar(tabs:[ Tab(text: "WHAT'S NEW"), Tab(text: "POPULAR"), Tab(text: "FAVOURITES"), ] , controller: _tabController, indicatorColor: Colors.white, ), ), body: Center( child: TabBarView(children: [ Favourites(), Popular(), Favourites(), ] , controller: _tabController,), ), drawer: DrawerNavigator(), ); } }
0
mirrored_repositories/Newsella/lib
mirrored_repositories/Newsella/lib/Screens/HomeScreen.dart
import 'package:flutter/material.dart'; import 'package:news_application/HomeScreens/Favourites.dart'; import 'package:news_application/HomeScreens/Popular.dart'; import 'package:news_application/HomeScreens/What\'sNew.dart'; import 'package:news_application/Shared_UI/Drawer_.dart'; import 'package:shared_preferences/shared_preferences.dart'; class HomeScreen extends StatefulWidget { @override _HomeScreenState createState() => _HomeScreenState(); } class _HomeScreenState extends State<HomeScreen> with SingleTickerProviderStateMixin { TabController _tabController; @override void initState() { super.initState(); _tabController = TabController(initialIndex:0,length: 3, vsync: this); } @override void dispose() { _tabController.dispose(); super.dispose(); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text("Explore"), centerTitle: false, actions:<Widget> [ IconButton(icon: Icon(Icons.search ), onPressed:(){}), IconButton(icon: Icon(Icons.more_vert), onPressed: (){}) ], bottom: TabBar(tabs:[ Tab(text: "WHAT'S NEW"), Tab(text: "POPULAR"), Tab(text: "FAVOURITES"), ] , controller: _tabController, indicatorColor: Colors.white, ), ), body: Center( child: TabBarView(children: [ WhatsNew(), Popular(), Favourites(), ] , controller: _tabController,), ), drawer: DrawerNavigator(), ); } }
0
mirrored_repositories/Newsella/lib
mirrored_repositories/Newsella/lib/Utilities/ThemeData.dart
import 'package:flutter/material.dart'; class AppTheme { static ThemeData apptheme = ThemeData( primaryColor: Colors.red, ); }
0
mirrored_repositories/Newsella
mirrored_repositories/Newsella/test/widget_test.dart
// This is a basic Flutter widget test. // // To perform an interaction with a widget in your test, use the WidgetTester // utility that Flutter provides. For example, you can send tap and scroll // gestures. You can also use WidgetTester to find child widgets in the widget // tree, read text, and verify that the values of widget properties are correct. import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:news_application/main.dart'; void main() { }
0
mirrored_repositories/flutter_smarthome_ui
mirrored_repositories/flutter_smarthome_ui/lib/main.dart
import 'package:flutter/material.dart'; import 'package:flutter_smarthome_ui/pages/home_page.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, home: HomePage(), ); } }
0
mirrored_repositories/flutter_smarthome_ui/lib
mirrored_repositories/flutter_smarthome_ui/lib/pages/home_page.dart
import 'package:flutter/material.dart'; import 'package:flutter_smarthome_ui/util/smart_devices_box.dart'; class HomePage extends StatefulWidget { const HomePage({Key? key}) : super(key: key); @override State<HomePage> createState() => _HomePageState(); } class _HomePageState extends State<HomePage> { // padding final double horizontalPadding = 40; final double verticalPadding = 25; // list of devices List mySmartDevices = [ ["Smart Light", "lib/icons/light-bulb.png", true], ["Smart AC", "lib/icons/air-conditioner.png", true], ["Smart TV", "lib/icons/smart-tv.png", true], ["Smart Fan", "lib/icons/fan.png", true], ]; void powerSwitchChanged(bool value, int index) { setState(() { mySmartDevices[index][2] = value; }); } @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.grey[300], body: SafeArea( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( padding: EdgeInsets.symmetric( horizontal: horizontalPadding, vertical: verticalPadding, ), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Image.asset( 'lib/icons/menu.png', height: 45, color: Colors.grey[800], ), //account icon Icon( Icons.person, size: 45, color: Colors.grey[800], ), ], ), ), const SizedBox(height: 20), // welcome Padding( padding: EdgeInsets.symmetric( horizontal: horizontalPadding, ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text('Welcome Home'), Text( 'Valerii Gassiev', style: TextStyle( fontSize: 40, ), ), ], ), ), const SizedBox(height: 25), Padding( padding: EdgeInsets.symmetric(horizontal: horizontalPadding), child: Divider( color: Colors.grey[400], thickness: 1, ), ), SizedBox(height: 25), // devices Padding( padding: EdgeInsets.symmetric(horizontal: horizontalPadding), child: Text('Smart Devices'), ), Expanded( child: GridView.builder( itemCount: mySmartDevices.length, padding: const EdgeInsets.all(25), gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: 2, childAspectRatio: 1/1.3, ), itemBuilder: (context, index) { return SmartDeviceBox( smartDeviceName: mySmartDevices[index][0], iconPath: mySmartDevices[index][1], PowerOn: mySmartDevices[index][2], onChanged: (value) => powerSwitchChanged(value, index), ); } ), ), ], ), ), //devices ); } }
0
mirrored_repositories/flutter_smarthome_ui/lib
mirrored_repositories/flutter_smarthome_ui/lib/util/smart_devices_box.dart
import 'dart:ffi'; import 'dart:math'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; class SmartDeviceBox extends StatelessWidget { final String smartDeviceName; final String iconPath; final bool PowerOn; void Function(bool)? onChanged; SmartDeviceBox({ super.key, required this.smartDeviceName, required this.iconPath, required this.PowerOn, required this.onChanged, }); @override Widget build(BuildContext context) { return Padding( padding: EdgeInsets.all(15.0), child: Container( decoration: BoxDecoration( color: PowerOn ? Colors.grey[900] : Colors.grey[200], borderRadius: BorderRadius.circular(24), ), padding: const EdgeInsets.symmetric(vertical: 25), child: Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Image.asset( iconPath, height: 65, color: PowerOn ? Colors.white : Colors.black, ), // device name Row( children: [ Expanded( child: Padding( padding: const EdgeInsets.only(left: 25), child: Text( smartDeviceName, style: TextStyle( fontWeight: FontWeight.bold, fontSize: 18, color: PowerOn ? Colors.white : Colors.black, ), ), ), ), Transform.rotate( angle: pi / 2, child: CupertinoSwitch( value: PowerOn, onChanged: onChanged, ), ), ], ), ], ), ), ); } }
0
mirrored_repositories/flutter_smarthome_ui
mirrored_repositories/flutter_smarthome_ui/test/widget_test.dart
// This is a basic Flutter widget test. // // To perform an interaction with a widget in your test, use the WidgetTester // utility in the flutter_test package. For example, you can send tap and scroll // gestures. You can also use WidgetTester to find child widgets in the widget // tree, read text, and verify that the values of widget properties are correct. import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_smarthome_ui/main.dart'; void main() { testWidgets('Counter increments smoke test', (WidgetTester tester) async { // Build our app and trigger a frame. await tester.pumpWidget(const MyApp()); // Verify that our counter starts at 0. expect(find.text('0'), findsOneWidget); expect(find.text('1'), findsNothing); // Tap the '+' icon and trigger a frame. await tester.tap(find.byIcon(Icons.add)); await tester.pump(); // Verify that our counter has incremented. expect(find.text('0'), findsNothing); expect(find.text('1'), findsOneWidget); }); }
0
mirrored_repositories/FlutterGREWords
mirrored_repositories/FlutterGREWords/lib/theme_data.dart
import 'package:flutter/material.dart'; class CustomThemeData { static Color secondaryColor = Colors.deepPurple; static Color secondaryAccentColor = Colors.purple; static Color accentTextColor = Colors.grey; }
0
mirrored_repositories/FlutterGREWords
mirrored_repositories/FlutterGREWords/lib/main.dart
import 'dart:io'; import 'package:firebase_analytics/firebase_analytics.dart'; import 'package:firebase_analytics/observer.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_gre/pages/home_page.dart'; import 'package:flutter_gre/pages/login/splash_screen.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:google_fonts/google_fonts.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { final FirebaseAnalytics analytics = FirebaseAnalytics(); final FirebaseMessaging _firebaseMessaging = FirebaseMessaging(); // This widget is the root of your application. @override Widget build(BuildContext context) { SystemChrome.setSystemUIOverlayStyle( SystemUiOverlayStyle(statusBarColor: Colors.deepPurple)); _firebaseMessaging.requestNotificationPermissions(); _firebaseMessaging.configure( onMessage: (payload) => _handleNotification(payload, context), onLaunch: (payload) => _handleNotification(payload, context), onResume: (payload) => _handleNotification(payload, context), //onBackgroundMessage: Platform.isIOS ? null : handleBackgroundNotification, ); return MaterialApp( title: 'GRE One', theme: ThemeData( primarySwatch: Colors.deepPurple, textTheme: GoogleFonts.openSansTextTheme()), home: SplashScreen(), debugShowCheckedModeBanner: false, navigatorObservers: [ FirebaseAnalyticsObserver(analytics: analytics), ], ); } /// Handles notification Future<void> _handleNotification( Map<dynamic, dynamic> message, BuildContext context) async { var data = message['data'] ?? message; print(message); // Try to show normal notification if app is not open try { FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = new FlutterLocalNotificationsPlugin(); var initializationSettingsAndroid = new AndroidInitializationSettings('ic_launcher'); var initializationSettingsIOS = new IOSInitializationSettings(); var initializationSettings = new InitializationSettings( initializationSettingsAndroid, initializationSettingsIOS); flutterLocalNotificationsPlugin.initialize(initializationSettings, onSelectNotification: (msg) => onSelectNotification(msg, context)); print(data); //var notificationChannel = data["notification"]["notification_channel"]; //var channelModel = getChannel(notificationChannel); var androidPlatformChannelSpecifics = AndroidNotificationDetails( "1", "General Notifications", "Reminders and promos", importance: Importance.Max, priority: Priority.High, ticker: 'ticker'); var iOSPlatformChannelSpecifics = IOSNotificationDetails(); var platformChannelSpecifics = NotificationDetails( androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics); await flutterLocalNotificationsPlugin.show( 0, Platform.isIOS ? data["notification"]["title"] : message["notification"]["title"], Platform.isIOS ? data["notification"]["body"] : message["notification"]["body"], platformChannelSpecifics, payload: 'Default_Sound'); } catch (e) { print(e); } } Future onSelectNotification(String payload, BuildContext context) async { if (payload != null) { debugPrint('notification payload: ' + payload); } await Navigator.push( context, MaterialPageRoute(builder: (context) => SplashScreen()), ); } } /// Handles notification Future<void> handleBackgroundNotification(Map<dynamic, dynamic> message) async { var data = message['data'] ?? message; print(message); // Try to show normal notification if app is not open try { FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = new FlutterLocalNotificationsPlugin(); var initializationSettingsAndroid = new AndroidInitializationSettings('ic_launcher'); var initializationSettingsIOS = new IOSInitializationSettings(); var initializationSettings = new InitializationSettings( initializationSettingsAndroid, initializationSettingsIOS); flutterLocalNotificationsPlugin.initialize( initializationSettings, onSelectNotification: (msg) async { // await Navigator.push( // context, // MaterialPageRoute(builder: (context) => SplashScreen()), // ); }, ); print(data); //var notificationChannel = data["notification"]["notification_channel"]; //var channelModel = getChannel(notificationChannel); var androidPlatformChannelSpecifics = AndroidNotificationDetails( "1", "General Notifications", "Reminders and promos", importance: Importance.Max, priority: Priority.High, ticker: 'ticker'); var iOSPlatformChannelSpecifics = IOSNotificationDetails(); var platformChannelSpecifics = NotificationDetails( androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics); await flutterLocalNotificationsPlugin.show( 0, Platform.isIOS ? data["notification"]["title"] : message["notification"]["title"], Platform.isIOS ? data["notification"]["body"] : message["notification"]["body"], platformChannelSpecifics, payload: 'Default_Sound'); } catch (e) { print(e); } }
0
mirrored_repositories/FlutterGREWords/lib
mirrored_repositories/FlutterGREWords/lib/sqlite/db_provider.dart
import 'dart:async'; import 'dart:io'; import 'package:flutter_gre/data/word.dart'; import 'package:path/path.dart'; import 'package:sqflite/sqflite.dart'; import 'package:path_provider/path_provider.dart'; class DBProvider { DBProvider._(); static final DBProvider db = DBProvider._(); static Database _database; Future<Database> get database async { if (_database != null) return _database; _database = await initDB(); return _database; } initDB() async { Directory documentsDirectory = await getApplicationDocumentsDirectory(); String path = join(documentsDirectory.path, "WordDB.db"); return await openDatabase( path, version: 1, onOpen: (db) {}, onCreate: (Database db, int version) async { await db.execute("CREATE TABLE Words (" "word_name TEXT PRIMARY KEY," "word_definition TEXT" ")"); }, ); } insertWord(Word word) async { final db = await database; var res = await db.insert("Words", word.toJson()); } Future<List<Word>> getAllWords() async { final db = await database; var res = await db.query("Words"); List<Word> list = res.isNotEmpty ? res.map((c) => Word.fromJson(c)).toList() : []; return list; } }
0
mirrored_repositories/FlutterGREWords/lib
mirrored_repositories/FlutterGREWords/lib/pages/home_page.dart
import 'dart:math'; import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gre/pages/awa/awa_list_screen.dart'; import 'package:flutter_gre/pages/info/about_app_screen.dart'; import 'package:flutter_gre/pages/info/gre_info_screen.dart'; import 'package:flutter_gre/pages/vocabulary/learn_words_page.dart'; import 'package:flutter_gre/pages/login/login_screen.dart'; import 'package:flutter_gre/pages/vocabulary/saved_words_page.dart'; import 'package:flutter_gre/data/facts.dart'; class HomePage extends StatefulWidget { @override _HomePageState createState() => _HomePageState(); } class _HomePageState extends State<HomePage> { String fact = ""; GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey(); @override void initState() { super.initState(); fact = FactData.facts[Random().nextInt(FactData.facts.length)]; } @override Widget build(BuildContext context) { return Scaffold( key: _scaffoldKey, backgroundColor: Theme.of(context).primaryColor, body: SafeArea( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[ SizedBox(height: 8.0), Padding( padding: const EdgeInsets.symmetric( horizontal: 16.0, vertical: 16.0, ), child: Text( "Ready to learn?", style: TextStyle( color: Colors.white, fontSize: 32.0, fontWeight: FontWeight.bold, ), ), ), Padding( padding: const EdgeInsets.symmetric(horizontal: 16.0), child: Divider( color: Colors.white, ), ), Padding( padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0), child: Text( "Did you know?", style: TextStyle( color: Colors.white, fontWeight: FontWeight.bold, fontSize: 18.0), ), ), Padding( padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0), child: Text(fact, style: TextStyle(color: Colors.white)), ), Padding( padding: const EdgeInsets.symmetric(horizontal: 16.0), child: Divider( color: Colors.white, ), ), Expanded( child: GridView( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: 2), children: <Widget>[ CategoryTitle( onTap: () { Navigator.push( context, MaterialPageRoute( builder: (context) => LearnWordsPage(), ), ); }, heroTag: "title1", title: "Learn Words", colorOne: Colors.blue, colorTwo: Colors.green, icon: Icons.chrome_reader_mode, ), CategoryTitle( onTap: () { Navigator.push( context, MaterialPageRoute( builder: (context) => SavedWordsPage(), ), ); }, heroTag: "title2", title: "Saved Words", colorOne: Colors.red, colorTwo: Colors.orange, icon: Icons.save, ), CategoryTitle( onTap: () async { FirebaseUser user = await FirebaseAuth.instance.currentUser(); if (user == null || user.isAnonymous) { _scaffoldKey.currentState.showSnackBar(SnackBar( content: Text("Not available for anonymous users"), action: SnackBarAction( label: "Sign In", onPressed: () { Navigator.pushAndRemoveUntil( context, MaterialPageRoute( builder: (context) => LoginScreen()), (route) => false); }), )); } else { Navigator.push( context, MaterialPageRoute( builder: (context) => AwaListScreen())); } }, heroTag: "title3", title: "AWA Essays", colorOne: Color(0xff56ab2f), colorTwo: Color(0xffa8e063), icon: Icons.edit, ), CategoryTitle( onTap: () { Navigator.push( context, MaterialPageRoute( builder: (context) => GreInfoScreen(), ), ); }, heroTag: "title4", title: "GRE Info", colorOne: Color(0xffcc2b5e), colorTwo: Color(0xff753a88), icon: Icons.info_outline, ), CategoryTitle( onTap: () { Navigator.push( context, MaterialPageRoute( builder: (context) => AboutAppScreen(), ), ); }, heroTag: "title5", title: "About App", colorOne: Color(0xff2193b0), colorTwo: Color(0xff6dd5ed), icon: Icons.phone_android, ), CategoryTitle( onTap: () { FirebaseAuth.instance.signOut().then((value) => Navigator.pushAndRemoveUntil( context, MaterialPageRoute( builder: (context) => LoginScreen()), (route) => false)); }, heroTag: "title6", title: "Logout", colorOne: Colors.red, colorTwo: Colors.red, icon: Icons.power_settings_new, ), ], ), ), ], ), ), ); } } class CategoryTitle extends StatelessWidget { final IconData icon; final String title; final VoidCallback onTap; final String heroTag; final colorOne; final colorTwo; const CategoryTitle( {Key key, this.icon, this.title, this.onTap, this.heroTag, this.colorOne, this.colorTwo}) : super(key: key); @override Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.all(16.0), child: Container( child: InkWell( onTap: onTap, child: Stack( children: <Widget>[ Center( child: Icon( icon, color: Colors.white, size: 55.0, )), Align( alignment: Alignment.bottomCenter, child: Padding( padding: const EdgeInsets.all(16.0), child: Hero( tag: heroTag, transitionOnUserGestures: true, child: Material( color: Colors.transparent, child: Text( title, style: TextStyle( color: Colors.white, fontSize: 20.0, fontWeight: FontWeight.bold, ), ), ), ), ), ) ], ), ), decoration: BoxDecoration( gradient: LinearGradient( colors: [ colorOne, colorTwo, ], stops: [ 0.0, 1.0, ], begin: Alignment.bottomLeft, end: Alignment.topRight, ), borderRadius: BorderRadius.circular(16.0), ), ), ); } }
0
mirrored_repositories/FlutterGREWords/lib/pages
mirrored_repositories/FlutterGREWords/lib/pages/awa/awa_list_screen.dart
import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gre/data/awa.dart'; import 'package:flutter_gre/models/essay_model.dart'; import 'package:flutter_gre/pages/awa/edit_essay_screen.dart'; import 'package:flutter_gre/pages/awa/write_essay_screen.dart'; import 'package:flutter_gre/services/firestore_service.dart'; import '../../theme_data.dart'; class AwaListScreen extends StatefulWidget { @override _AwaListScreenState createState() => _AwaListScreenState(); } class _AwaListScreenState extends State<AwaListScreen> with SingleTickerProviderStateMixin { TabController _tabController; FirebaseUser _user; var months = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", ]; void _getUser() async { _user = await FirebaseAuth.instance.currentUser(); } @override void initState() { super.initState(); _tabController = TabController(initialIndex: 0, length: 3, vsync: this); _tabController.addListener(() { setState(() {}); }); _getUser(); } @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Theme.of(context).primaryColor, appBar: AppBar( centerTitle: true, leading: InkWell( child: Icon( Icons.arrow_back_ios, color: Colors.deepPurple, ), onTap: () { Navigator.pop(context); }, ), elevation: 0.0, backgroundColor: Colors.white, title: Hero( child: Material( color: Colors.transparent, child: Text( "AWA Pool", style: TextStyle( color: CustomThemeData.secondaryColor, fontSize: 22.0, ), ), ), tag: "title3", transitionOnUserGestures: true, ), bottom: TabBar( tabs: [ Tab( child: Text( "Issue", style: TextStyle( color: _tabController.index == 0 ? Colors.white : Theme.of(context).primaryColor), ), ), Tab( child: Text( "Argument", style: TextStyle( color: _tabController.index == 1 ? Colors.white : Theme.of(context).primaryColor), ), ), Tab( child: Text( "My Essays", style: TextStyle( color: _tabController.index == 2 ? Colors.white : Theme.of(context).primaryColor), ), ) ], indicatorColor: CustomThemeData.secondaryColor, indicator: CustomTabIndicator(), controller: _tabController, ), ), body: TabBarView( controller: _tabController, children: [ _buildIssueSection(), _buildArgumentSection(), _buildSavedSection(), ], ), ); } Widget _buildIssueSection() { var data = essayData.where((element) => element.type == EssayType.issue).toList(); return ListView.builder( itemBuilder: (context, position) { return EssayCard( index: position, title: data[position].question, description: "Issue", onTap: () { Navigator.of(context).push(MaterialPageRoute( builder: (context) => WriteEssayScreen( essay: data[position], ))); }, ); }, itemCount: data.length, ); } Widget _buildArgumentSection() { var data = essayData .where((element) => element.type == EssayType.argument) .toList(); return ListView.builder( itemBuilder: (context, position) { return EssayCard( index: position, title: data[position].question, description: "Argument", onTap: () { Navigator.of(context).push(MaterialPageRoute( builder: (context) => WriteEssayScreen( essay: data[position], ))); }, ); }, itemCount: data.length, ); } Widget _buildSavedSection() { if (_user == null) { return Center( child: CircularProgressIndicator( backgroundColor: Colors.white, ), ); } return FutureBuilder<List<EssayModel>>( future: FirestoreService().getUserEssays(_user.uid), builder: (context, snapshot) { if (snapshot.data == null) { return Center( child: CircularProgressIndicator( backgroundColor: Colors.white, ), ); } return ListView.builder( itemBuilder: (context, position) { var dateTime = DateTime.fromMillisecondsSinceEpoch( snapshot.data[position].timestamp); return EssayCard( index: position, title: snapshot.data[position].question, description: dateTime.day.toString() + " " + months[dateTime.month - 1], maxLines: 4, onTap: () { Navigator.of(context).push(MaterialPageRoute( builder: (context) => EditEssayScreen( essayModel: snapshot.data[position], ))); }, ); }, itemCount: snapshot.data.length, ); }); } } class EssayCard extends StatelessWidget { final VoidCallback onTap; final String title; final String description; final int index; final int maxLines; const EssayCard( {Key key, this.onTap, this.index, this.title, this.description, this.maxLines = 8}) : super(key: key); @override Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.all(8.0), child: Card( elevation: 2.0, child: ListTile( onTap: onTap, title: Padding( padding: const EdgeInsets.all(8.0), child: Text( title, maxLines: maxLines, overflow: TextOverflow.ellipsis, ), ), subtitle: Padding( padding: const EdgeInsets.all(8.0), child: Text(description), ), trailing: Icon(Icons.arrow_forward_ios), ), ), ); } } class CustomTabIndicator extends Decoration { @override _CustomPainter createBoxPainter([VoidCallback onChanged]) { return new _CustomPainter(this, onChanged); } } class _CustomPainter extends BoxPainter { final CustomTabIndicator decoration; _CustomPainter(this.decoration, VoidCallback onChanged) : assert(decoration != null), super(onChanged); @override void paint(Canvas canvas, Offset offset, ImageConfiguration configuration) { assert(configuration != null); assert(configuration.size != null); //offset is the position from where the decoration should be drawn. //configuration.size tells us about the height and width of the tab. final Rect rect = offset & configuration.size; final Paint paint = Paint(); paint.color = Colors.deepPurple; paint.style = PaintingStyle.fill; canvas.drawRRect( RRect.fromRectAndRadius(rect, Radius.circular(0.0)), paint); } }
0
mirrored_repositories/FlutterGREWords/lib/pages
mirrored_repositories/FlutterGREWords/lib/pages/awa/write_essay_screen.dart
import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gre/data/awa.dart'; import 'package:flutter_gre/services/firestore_service.dart'; class WriteEssayScreen extends StatefulWidget { final Essay essay; const WriteEssayScreen({Key key, this.essay}) : super(key: key); @override _WriteEssayScreenState createState() => _WriteEssayScreenState(); } class _WriteEssayScreenState extends State<WriteEssayScreen> { bool questionOpened = true; bool publicEssay = true; TextEditingController _textController = TextEditingController(); GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey(); FirestoreService _firestoreService = FirestoreService(); @override Widget build(BuildContext context) { return Scaffold( key: _scaffoldKey, backgroundColor: Theme.of(context).primaryColor, body: ListView( children: <Widget>[ SafeArea( child: Row( children: <Widget>[ IconButton( icon: Icon( Icons.arrow_back_ios, color: Colors.white, size: 24, ), onPressed: () { Navigator.pop(context); }), Expanded( child: Center( child: Transform.translate( offset: Offset(-24.0, 0), child: Padding( padding: const EdgeInsets.all(4.0), child: Text( "Write", style: TextStyle(color: Colors.white, fontSize: 26.0), ), ), ), ), ), ], ), ), Padding( padding: const EdgeInsets.all(8.0), child: ExpansionTile( title: Text( "Question", style: questionOpened ? TextStyle(fontWeight: FontWeight.bold) : TextStyle( color: Colors.white, fontWeight: FontWeight.bold), ), initiallyExpanded: true, children: <Widget>[ Padding( padding: const EdgeInsets.all(16.0), child: Text( widget.essay.question, ), ), ], backgroundColor: Colors.white, onExpansionChanged: (val) { setState(() { questionOpened = val; }); }, ), ), Padding( padding: const EdgeInsets.all(8.0), child: TextField( controller: _textController, decoration: InputDecoration( fillColor: Colors.white, filled: true, border: OutlineInputBorder(), hintText: "Write an essay / outline for the above question. Save this once done to compare your essays later. You can also choose to make the essay public.", hintMaxLines: 6, ), minLines: 6, maxLines: null, ), ), Padding( padding: const EdgeInsets.all(6.0), child: Card( child: CheckboxListTile( value: publicEssay, onChanged: (val) { setState(() { publicEssay = val; }); }, title: Text("Make essay visible to other users"), subtitle: Text("Coming Soon"), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () async { _scaffoldKey.currentState .showSnackBar(SnackBar(content: Text("Uploading..."))); FirebaseUser user = await FirebaseAuth.instance.currentUser(); var essays = await FirestoreService().getUserEssays(user.uid); if (essays.length > 150) { _scaffoldKey.currentState .showSnackBar(SnackBar(content: Text("Essay Limit!"))); return; } if (_textController.text.length > 20000) { _scaffoldKey.currentState.showSnackBar( SnackBar(content: Text("Character Limit Reached!"))); return; } _firestoreService .uploadEssay( widget.essay.question, widget.essay.type == EssayType.issue ? "Issue" : "Argument", _textController.text.trim(), publicEssay, user.uid, ) .then((value) { _scaffoldKey.currentState.hideCurrentSnackBar(); _scaffoldKey.currentState .showSnackBar(SnackBar(content: Text("Success"))); Future.delayed(Duration(seconds: 1)).then((value) { Navigator.pop(context); }); }).catchError((err) { _scaffoldKey.currentState.hideCurrentSnackBar(); _scaffoldKey.currentState.showSnackBar( SnackBar(content: Text("Something went wrong"))); }); }, child: Text( "Submit", style: TextStyle( color: Theme.of(context).primaryColor, fontWeight: FontWeight.bold, fontSize: 16.0), ), color: Colors.white, padding: EdgeInsets.all(16.0), ), ) ], ), ); } }
0
mirrored_repositories/FlutterGREWords/lib/pages
mirrored_repositories/FlutterGREWords/lib/pages/awa/edit_essay_screen.dart
import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gre/data/awa.dart'; import 'package:flutter_gre/models/essay_model.dart'; import 'package:flutter_gre/services/firestore_service.dart'; class EditEssayScreen extends StatefulWidget { final EssayModel essayModel; const EditEssayScreen({Key key, this.essayModel}) : super(key: key); @override _EditEssayScreenState createState() => _EditEssayScreenState(); } class _EditEssayScreenState extends State<EditEssayScreen> { bool questionOpened = true; bool publicEssay = true; TextEditingController _textController = TextEditingController(); GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey(); FirestoreService _firestoreService = FirestoreService(); @override void initState() { super.initState(); _textController.text = widget.essayModel.text; publicEssay = widget.essayModel.public; } @override Widget build(BuildContext context) { return Scaffold( key: _scaffoldKey, backgroundColor: Theme.of(context).primaryColor, body: ListView( children: <Widget>[ SafeArea( child: Row( children: <Widget>[ IconButton( icon: Icon( Icons.arrow_back_ios, color: Colors.white, size: 24, ), onPressed: () { Navigator.pop(context); }), Expanded( child: Center( child: Transform.translate( offset: Offset(-24.0, 0), child: Padding( padding: const EdgeInsets.all(4.0), child: Text( "Edit", style: TextStyle(color: Colors.white, fontSize: 26.0), ), ), ), ), ), ], ), ), Padding( padding: const EdgeInsets.all(8.0), child: ExpansionTile( title: Text( "Question", style: questionOpened ? TextStyle(fontWeight: FontWeight.bold) : TextStyle( color: Colors.white, fontWeight: FontWeight.bold), ), initiallyExpanded: true, children: <Widget>[ Padding( padding: const EdgeInsets.all(16.0), child: Text( widget.essayModel.question, ), ), ], backgroundColor: Colors.white, onExpansionChanged: (val) { setState(() { questionOpened = val; }); }, ), ), Padding( padding: const EdgeInsets.all(8.0), child: TextField( controller: _textController, decoration: InputDecoration( fillColor: Colors.white, filled: true, border: OutlineInputBorder(), hintText: "Write an essay / outline for the above question. Save this once done to compare your essays later. You can also choose to make the essay public.", hintMaxLines: 6, ), minLines: 6, maxLines: null, ), ), Padding( padding: const EdgeInsets.all(6.0), child: Card( child: CheckboxListTile( value: publicEssay, onChanged: (val) { setState(() { publicEssay = val; }); }, title: Text("Make essay visible to other users"), subtitle: Text("Coming Soon"), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () async { _scaffoldKey.currentState .showSnackBar(SnackBar(content: Text("Uploading..."))); Firestore _db = Firestore.instance; _db .collection('essays') .document(widget.essayModel.id) .updateData({ "text": _textController.text, "public": publicEssay, }).then((value) { _scaffoldKey.currentState.hideCurrentSnackBar(); _scaffoldKey.currentState .showSnackBar(SnackBar(content: Text("Success"))); Future.delayed(Duration(seconds: 1)).then((value) { Navigator.pop(context); }); }).catchError((err) { _scaffoldKey.currentState.hideCurrentSnackBar(); _scaffoldKey.currentState.showSnackBar( SnackBar(content: Text("Something went wrong"))); }); }, child: Text( "Update", style: TextStyle( color: Theme.of(context).primaryColor, fontWeight: FontWeight.bold, fontSize: 16.0), ), color: Colors.white, padding: EdgeInsets.all(16.0), ), ) ], ), ); } }
0
mirrored_repositories/FlutterGREWords/lib/pages
mirrored_repositories/FlutterGREWords/lib/pages/vocabulary/learn_words_page.dart
import 'dart:math'; import 'package:flutter/material.dart'; import 'package:flutter_gre/data/word.dart'; import 'package:flutter_gre/data/words.dart'; import 'package:flutter_gre/theme_data.dart'; import 'package:flutter_gre/sqlite/db_provider.dart'; import 'package:flutter_tts/flutter_tts.dart'; class LearnWordsPage extends StatefulWidget { @override _LearnWordsPageState createState() => _LearnWordsPageState(); } class _LearnWordsPageState extends State<LearnWordsPage> { GlobalKey<ScaffoldState> scaffoldKey = GlobalKey(); FlutterTts flutterTts = FlutterTts(); var randomWordList = []; var gradients = [ LinearGradient( colors: [ Colors.blue, Colors.green, ], stops: [ 0.0, 1.0, ], begin: Alignment.bottomLeft, end: Alignment.topRight, ), LinearGradient( colors: [ Colors.red, Colors.orange, ], stops: [ 0.0, 1.0, ], begin: Alignment.bottomLeft, end: Alignment.topRight, ), LinearGradient( colors: [ Colors.deepPurple, Colors.deepPurpleAccent, ], stops: [ 0.0, 1.0, ], begin: Alignment.bottomLeft, end: Alignment.topRight, ), LinearGradient( colors: [ Colors.teal, Colors.cyan, ], stops: [ 0.0, 1.0, ], begin: Alignment.bottomLeft, end: Alignment.topRight, ), LinearGradient( colors: [ Color(0xffcc2b5e), Color(0xff753a88), ], stops: [ 0.0, 1.0, ], begin: Alignment.bottomLeft, end: Alignment.topRight, ), LinearGradient( colors: [ Color(0xff56ab2f), Color(0xffa8e063), ], stops: [ 0.0, 1.0, ], begin: Alignment.bottomLeft, end: Alignment.topRight, ), ]; @override void initState() { super.initState(); randomWordList = shuffle(WordData.greData); } @override Widget build(BuildContext context) { return Scaffold( key: scaffoldKey, backgroundColor: Colors.white, appBar: AppBar( centerTitle: true, leading: InkWell( child: Icon( Icons.arrow_back_ios, color: Colors.deepPurple, ), onTap: () { Navigator.pop(context); }, ), elevation: 0.0, backgroundColor: Colors.white, title: Hero( child: Material( color: Colors.transparent, child: Text( "Learn New Words", style: TextStyle( color: CustomThemeData.secondaryColor, fontSize: 22.0, ), ), ), tag: "title1", transitionOnUserGestures: true, ), ), body: PageView.builder( itemBuilder: (context, position) { return Stack( children: [ Container( width: double.infinity, child: Column( children: <Widget>[ Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: <Widget>[ Padding( padding: const EdgeInsets.all(16.0), child: Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Padding( padding: const EdgeInsets.all(8.0), child: Text( randomWordList[position].wordTitle, style: TextStyle( color: Colors.white, fontSize: 30.0, fontWeight: FontWeight.bold), ), ), InkWell( onTap: () { _speakWord( randomWordList[position].wordTitle); }, child: Padding( padding: const EdgeInsets.all(8.0), child: Icon( Icons.volume_up, color: Colors.white, ), ), ) ], ), ), Padding( padding: const EdgeInsets.all(16.0), child: Text( randomWordList[position].wordDefinition, style: TextStyle( color: Colors.white, fontSize: 18.0), ), ), ], ), ), Padding( padding: const EdgeInsets.all(16.0), child: Row( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Icon( Icons.keyboard_arrow_up, color: Colors.white, ), SizedBox( width: 8.0, ), Text( "Swipe Up", style: TextStyle(color: Colors.white), ), SizedBox( width: 8.0, ), Icon( Icons.keyboard_arrow_up, color: Colors.white, ), ], ), ), ], ), decoration: BoxDecoration( gradient: gradients[position % gradients.length], ), ), Padding( padding: const EdgeInsets.all(16.0), child: Align( alignment: Alignment.topRight, child: InkWell( splashColor: Colors.white, onTap: () { _addWord( Word(randomWordList[position].wordTitle, randomWordList[position].wordDefinition), ); scaffoldKey.currentState .showSnackBar(SnackBar(content: Text("Word Added!"))); }, child: Icon( Icons.file_download, color: Colors.white, size: 40.0, ), ), ), ) ], ); }, scrollDirection: Axis.vertical, itemCount: randomWordList.length, ), ); } void _addWord(Word word) { DBProvider.db.insertWord(word); } void _speakWord(String word) async { await flutterTts.speak(word); } List shuffle(List items) { var random = new Random(); // Go through all elements. for (var i = items.length - 1; i > 0; i--) { // Pick a pseudorandom number according to the list length var n = random.nextInt(i + 1); var temp = items[i]; items[i] = items[n]; items[n] = temp; } return items; } }
0
mirrored_repositories/FlutterGREWords/lib/pages
mirrored_repositories/FlutterGREWords/lib/pages/vocabulary/saved_words_page.dart
import 'package:flutter/material.dart'; import 'package:flutter_gre/data/word.dart'; import 'package:flutter_gre/data/words.dart'; import 'package:flutter_gre/sqlite/db_provider.dart'; import 'package:flutter_gre/theme_data.dart'; class SavedWordsPage extends StatefulWidget { @override _SavedWordsPageState createState() => _SavedWordsPageState(); } class _SavedWordsPageState extends State<SavedWordsPage> { List<Word> words; var gradients = [ LinearGradient( colors: [ Colors.blue, Colors.green, ], stops: [ 0.3, 0.7, ], begin: Alignment.bottomLeft, end: Alignment.topRight, ), LinearGradient( colors: [ Colors.red, Colors.orange, ], stops: [ 0.3, 0.7, ], begin: Alignment.bottomLeft, end: Alignment.topRight, ), LinearGradient( colors: [ Colors.deepPurple, Colors.deepPurpleAccent, ], stops: [ 0.3, 0.7, ], begin: Alignment.bottomLeft, end: Alignment.topRight, ), LinearGradient( colors: [ Colors.teal, Colors.cyan, ], stops: [ 0.3, 0.7, ], begin: Alignment.bottomLeft, end: Alignment.topRight, ), ]; @override void initState() { super.initState(); _loadWords(); } @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, appBar: AppBar( centerTitle: true, leading: InkWell( child: Icon( Icons.arrow_back_ios, color: Colors.deepPurple, ), onTap: () { Navigator.pop(context); }, ), elevation: 0.0, backgroundColor: Colors.white, title: Hero( child: Material( color: Colors.transparent, child: Text( "Saved Words", style: TextStyle( color: CustomThemeData.secondaryColor, fontSize: 22.0, ), ), ), tag: "title2", transitionOnUserGestures: true, ), ), body: words == null ? CircularProgressIndicator() : (words.isEmpty ? Center( child: Text( "It's quite lonely here...", style: TextStyle( color: Colors.white, ), ), ) : _buildPage()), ); } Widget _buildPage() { return PageView.builder( itemBuilder: (context, position) { return Container( width: double.infinity, child: Column( children: <Widget>[ Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: <Widget>[ Padding( padding: const EdgeInsets.all(16.0), child: Text( words[position].wordTitle, style: TextStyle(color: Colors.white, fontSize: 30.0), ), ), Padding( padding: const EdgeInsets.all(16.0), child: Text( words[position].wordDefinition, style: TextStyle(color: Colors.white, fontSize: 18.0), ), ), ], ), ), Padding( padding: const EdgeInsets.all(16.0), child: Row( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Icon( Icons.keyboard_arrow_up, color: Colors.white, ), SizedBox( width: 8.0, ), Text( "Swipe Up", style: TextStyle(color: Colors.white), ), SizedBox( width: 8.0, ), Icon( Icons.keyboard_arrow_up, color: Colors.white, ), ], ), ), ], ), decoration: BoxDecoration( gradient: gradients[position % gradients.length], ), ); }, scrollDirection: Axis.vertical, itemCount: words.length, ); } void _loadWords() async { words = await DBProvider.db.getAllWords(); setState(() {}); } }
0
mirrored_repositories/FlutterGREWords/lib/pages
mirrored_repositories/FlutterGREWords/lib/pages/login/email_login_screen.dart
import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_gre/pages/home_page.dart'; import 'package:flutter_gre/pages/login/reset_password_screen.dart'; import 'package:flutter_gre/pages/login/verify_email_screen.dart'; import 'package:regexed_validator/regexed_validator.dart'; class EmailLoginScreen extends StatefulWidget { @override _EmailLoginScreenState createState() => _EmailLoginScreenState(); } class _EmailLoginScreenState extends State<EmailLoginScreen> with SingleTickerProviderStateMixin { bool isPasswordObscured = true; TextEditingController _usernameController = TextEditingController(); TextEditingController _passwordController = TextEditingController(); TabController _tabController; final _formKey = GlobalKey<FormState>(); final _scaffoldKey = GlobalKey<ScaffoldState>(); FirebaseAuth _auth = FirebaseAuth.instance; @override void initState() { super.initState(); _tabController = TabController( length: 2, vsync: this, )..addListener(() { setState(() {}); }); } @override Widget build(BuildContext context) { return Scaffold( key: _scaffoldKey, appBar: AppBar( title: Text("Email Sign-In"), ), body: Form( key: _formKey, child: ListView( children: <Widget>[ Padding( padding: const EdgeInsets.all(8.0), child: Text("I want to: "), ), Padding( padding: const EdgeInsets.all(8.0), child: Container( decoration: BoxDecoration( border: Border.all(color: Theme.of(context).accentColor), color: Colors.grey[300], borderRadius: BorderRadius.circular(16.0)), child: TabBar( tabs: [ Tab( child: Text( "Sign Up", style: TextStyle( color: _tabController.index == 0 ? Colors.white : Colors.black), ), ), Tab( child: Text( "Sign In", style: TextStyle( color: _tabController.index == 1 ? Colors.white : Colors.black), ), ), ], controller: _tabController, indicator: BoxDecoration( color: Colors.red, borderRadius: BorderRadius.circular(16.0)), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: Text("Enter your email"), ), Padding( padding: const EdgeInsets.all(8.0), child: TextFormField( decoration: InputDecoration( border: OutlineInputBorder(), hintText: "[email protected]"), controller: _usernameController, validator: (val) { if (!validator.email(val)) { return "Email not valid"; } return null; }, ), ), Padding( padding: const EdgeInsets.all(8.0), child: Text("Password"), ), Padding( padding: const EdgeInsets.all(8.0), child: TextFormField( decoration: InputDecoration( border: OutlineInputBorder(), hintText: "*********", suffixIcon: IconButton( icon: Icon(isPasswordObscured ? Icons.visibility : Icons.visibility_off), onPressed: () { setState(() { isPasswordObscured = !isPasswordObscured; }); })), validator: (val) { if (_passwordController.text.length < 6) { return "Not enough charac"; } return null; }, obscureText: isPasswordObscured, controller: _passwordController, ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { if (_formKey.currentState.validate()) { String username = _usernameController.text.trim(); String password = _passwordController.text.trim(); if (_tabController.index == 1) { _signInWithEmail(username, password); } else { _signUpWithEmail(username, password); } } }, child: Text( _tabController.index == 0 ? "Sign Up" : "Sign In", style: TextStyle(color: Colors.white), ), padding: EdgeInsets.all(16.0), color: Theme.of(context).primaryColor, ), ), Center( child: Padding( padding: const EdgeInsets.all(8.0), child: InkWell( child: Text( "Forgot password?", style: TextStyle( color: Theme.of(context).primaryColor, decoration: TextDecoration.underline), ), onTap: () { Navigator.push( context, MaterialPageRoute( builder: (context) => ResetPasswordScreen())); }, ), ), ) ], ), autovalidate: true, ), ); } void _signInWithEmail(String username, String password) { _auth.signInWithEmailAndPassword(email: username, password: password).then( (result) { if (result.user == null) { _scaffoldKey.currentState .showSnackBar(SnackBar(content: Text("Sign-in failed"))); } else { if (result.user.isEmailVerified) Navigator.pushReplacement( context, MaterialPageRoute(builder: (context) => HomePage())); else Navigator.pushAndRemoveUntil( context, MaterialPageRoute( builder: (context) => VerifyEmailScreen( user: result.user, )), (r) => false); } }, onError: (err) { _scaffoldKey.currentState .showSnackBar(SnackBar(content: Text("Sign-in failed"))); }); } void _signUpWithEmail(String username, String password) { _auth .createUserWithEmailAndPassword(email: username, password: password) .then((result) { print(result.toString()); if (result.user == null) { _scaffoldKey.currentState .showSnackBar(SnackBar(content: Text("Sign-in failed"))); } else { Navigator.pushAndRemoveUntil( context, MaterialPageRoute( builder: (context) => VerifyEmailScreen( user: result.user, )), (r) => false); } }, onError: (err) { print(err); _scaffoldKey.currentState.showSnackBar( SnackBar(content: Text("Sign-in failed: ${err.message}"))); }); } }
0
mirrored_repositories/FlutterGREWords/lib/pages
mirrored_repositories/FlutterGREWords/lib/pages/login/verify_email_screen.dart
import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gre/pages/home_page.dart'; import 'login_screen.dart'; class VerifyEmailScreen extends StatefulWidget { final FirebaseUser user; const VerifyEmailScreen({Key key, this.user}) : super(key: key); @override _VerifyEmailScreenState createState() => _VerifyEmailScreenState(); } class _VerifyEmailScreenState extends State<VerifyEmailScreen> { FirebaseAuth _auth = FirebaseAuth.instance; final _scaffoldKey = GlobalKey<ScaffoldState>(); @override void initState() { super.initState(); widget.user.sendEmailVerification(); } @override Widget build(BuildContext context) { return Scaffold( key: _scaffoldKey, appBar: AppBar( title: Text("Verify Email"), ), body: ListView( children: <Widget>[ Padding( padding: const EdgeInsets.all(16.0), child: Text( "We've sent you an email verification link on ${widget.user.email}. Please verify your account and hit refresh."), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () async { var user = await _auth.currentUser(); await user.reload(); user = await _auth.currentUser(); if (user.isEmailVerified) { Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) => HomePage())); } else { _scaffoldKey.currentState.showSnackBar( SnackBar(content: Text("Email not verified"))); } }, child: Text( "Refresh", style: TextStyle(color: Colors.white), ), color: Theme.of(context).primaryColor, padding: EdgeInsets.all(16.0), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { Navigator.pushAndRemoveUntil( context, MaterialPageRoute( builder: (context) => VerifyEmailScreen( user: widget.user, )), (r) => false); }, child: Text( "Resend verification mail", style: TextStyle(color: Colors.white), ), color: Theme.of(context).primaryColor, padding: EdgeInsets.all(16.0), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { _auth.signOut().then((value) { Navigator.pushAndRemoveUntil( context, MaterialPageRoute(builder: (context) => LoginScreen()), (r) => false); }); }, child: Text( "Log out", style: TextStyle(color: Colors.white), ), color: Theme.of(context).primaryColor, padding: EdgeInsets.all(16.0), ), ), ], ), ); } }
0
mirrored_repositories/FlutterGREWords/lib/pages
mirrored_repositories/FlutterGREWords/lib/pages/login/reset_password_screen.dart
import 'dart:math'; import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/material.dart'; import 'package:regexed_validator/regexed_validator.dart'; class ResetPasswordScreen extends StatefulWidget { @override _ResetPasswordScreenState createState() => _ResetPasswordScreenState(); } class _ResetPasswordScreenState extends State<ResetPasswordScreen> { TextEditingController _emailController = TextEditingController(); GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey(); FirebaseAuth _auth = FirebaseAuth.instance; @override Widget build(BuildContext context) { return Scaffold( key: _scaffoldKey, appBar: AppBar( title: Text("Reset password screen"), ), body: ListView( children: <Widget>[ Padding( padding: const EdgeInsets.symmetric(vertical: 16.0, horizontal: 8.0), child: Text("Enter your email"), ), Padding( padding: const EdgeInsets.all(8.0), child: TextField( controller: _emailController, decoration: InputDecoration( border: OutlineInputBorder(), hintText: "[email protected]"), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { String email = _emailController.text.trim(); if (validator.email(email)) { _auth.sendPasswordResetEmail(email: email).then((val) { _scaffoldKey.currentState.showSnackBar(SnackBar( content: Text( "Password reset link sent. Please check your email."))); }, onError: (err) { _scaffoldKey.currentState.showSnackBar( SnackBar(content: Text("Failed: ${err.message}"))); }).catchError((error) { print(error); _scaffoldKey.currentState .showSnackBar(SnackBar(content: Text("Error"))); }).timeout(Duration(seconds: 5), onTimeout: () { _scaffoldKey.currentState .showSnackBar(SnackBar(content: Text("Timeout"))); }); } else { _scaffoldKey.currentState.showSnackBar( SnackBar(content: Text("Not an email address"))); } }, child: Text( "Submit", style: TextStyle(color: Colors.white), ), color: Theme.of(context).primaryColor, padding: EdgeInsets.all(16.0), ), ) ], ), ); } }
0
mirrored_repositories/FlutterGREWords/lib/pages
mirrored_repositories/FlutterGREWords/lib/pages/login/splash_screen.dart
import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gre/pages/home_page.dart'; import 'package:flutter_gre/pages/login/verify_email_screen.dart'; import 'login_screen.dart'; /// Splash screen /// TODO: Move splash screen to Android side to initialise before Flutter app starts class SplashScreen extends StatefulWidget { @override _SplashScreenState createState() => _SplashScreenState(); } class _SplashScreenState extends State<SplashScreen> { @override void initState() { super.initState(); Future.delayed(Duration(seconds: 2)).then((val) async { FirebaseAuth _auth = FirebaseAuth.instance; var user = await _auth.currentUser(); if (user != null) { if (user.isEmailVerified || user.isAnonymous) Navigator.pushReplacement( context, MaterialPageRoute(builder: (context) => HomePage())); else Navigator.pushReplacement( context, MaterialPageRoute( builder: (context) => VerifyEmailScreen( user: user, ))); } else Navigator.pushReplacement( context, MaterialPageRoute(builder: (context) => LoginScreen())); }); } @override Widget build(BuildContext context) { return Scaffold( body: Container( color: Theme.of(context).primaryColor, child: Hero( tag: "logo", child: Center( child: ClipRRect( borderRadius: BorderRadius.circular(16.0), child: Image.asset( 'images/app_logo.png', height: 100.0, width: 100.0, ), ), ), ), ), ); } }
0
mirrored_repositories/FlutterGREWords/lib/pages
mirrored_repositories/FlutterGREWords/lib/pages/login/login_screen.dart
import 'dart:io'; import 'package:apple_sign_in/apple_sign_in.dart' hide AppleSignInButton; import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/material.dart'; import 'package:flutter_auth_buttons/flutter_auth_buttons.dart'; import 'package:flutter_gre/pages/home_page.dart'; import 'package:google_sign_in/google_sign_in.dart'; import 'email_login_screen.dart'; /// First page to see after splash screen. class LoginScreen extends StatefulWidget { @override _LoginScreenState createState() => _LoginScreenState(); } class _LoginScreenState extends State<LoginScreen> with TickerProviderStateMixin { FirebaseAuth _auth = FirebaseAuth.instance; GoogleSignIn _googleSignIn = GoogleSignIn( scopes: [ 'email', ], ); @override void initState() { super.initState(); } @override Widget build(BuildContext context) { return Scaffold( body: Container( width: double.infinity, color: Theme.of(context).primaryColor, child: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: <Widget>[ _buildTitle(), _buildButtons(), ], ), ), ); } Widget _buildTitle() { return Hero( tag: "logo", child: Container( color: Theme.of(context).primaryColor, child: Center( child: ClipRRect( borderRadius: BorderRadius.circular(16.0), child: Image.asset( 'images/app_logo.png', height: 100.0, width: 100.0, ), ), ), ), ); } Widget _buildButtons() { return Container( child: Column( children: <Widget>[ Container( width: 240.0, child: GoogleSignInButton( darkMode: true, onPressed: () { _handleSignIn().then((user) { if (user != null) { _proceedToMainScreen(); } }); }, ), ), if (Platform.isIOS) SizedBox( height: 8.0, ), if (Platform.isIOS) SizedBox( width: 240.0, child: AppleSignInButton( onPressed: () { _signInWithApple(); }, ), ), SizedBox( height: 8.0, ), SizedBox( width: 240.0, child: FlatButton( color: Colors.white, onPressed: () { _signInWithEmail(); }, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: <Widget>[ Icon( Icons.email, color: Theme.of(context).primaryColor, ), Padding( padding: const EdgeInsets.all(8.0), child: Text( "Sign in with Email", style: TextStyle( color: Colors.black, fontSize: 18.0, ), ), ), ], ), ), ), SizedBox( height: 8.0, ), SizedBox( width: 240.0, child: FlatButton( color: Colors.white, onPressed: () { _signInAnonymously(); }, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: <Widget>[ Icon( Icons.account_circle, color: Theme.of(context).primaryColor, ), Padding( padding: const EdgeInsets.all(8.0), child: Text( "Anonymous Login", style: TextStyle( color: Colors.black, fontSize: 18.0, ), ), ), ], ), ), ), ], ), ); } void _proceedToMainScreen() { Navigator.pushReplacement( context, MaterialPageRoute(builder: (context) => HomePage())); } void _signInWithEmail() { Navigator.push( context, MaterialPageRoute(builder: (context) => EmailLoginScreen())); } void _signInWithApple() async { try { final AuthorizationResult result = await AppleSignIn.performRequests([ AppleIdRequest(requestedScopes: [Scope.email, Scope.fullName]) ]); switch (result.status) { case AuthorizationStatus.authorized: try { print("successful sign in"); final AppleIdCredential appleIdCredential = result.credential; OAuthProvider oAuthProvider = new OAuthProvider(providerId: "apple.com"); final AuthCredential credential = oAuthProvider.getCredential( idToken: String.fromCharCodes(appleIdCredential.identityToken), accessToken: String.fromCharCodes(appleIdCredential.authorizationCode), ); final AuthResult _res = await FirebaseAuth.instance.signInWithCredential(credential); FirebaseAuth.instance.currentUser().then((val) async { UserUpdateInfo updateUser = UserUpdateInfo(); updateUser.displayName = "${appleIdCredential.fullName.givenName} ${appleIdCredential.fullName.familyName}"; updateUser.photoUrl = "define an url"; await val.updateProfile(updateUser); Navigator.push( context, MaterialPageRoute(builder: (context) => HomePage())); }); } catch (e) { print(e); } break; case AuthorizationStatus.error: print("Error"); break; case AuthorizationStatus.cancelled: print('User cancelled'); break; } } catch (error) { print("error with apple sign in"); } } Future<FirebaseUser> _handleSignIn() async { final GoogleSignInAccount googleUser = await _googleSignIn.signIn(); final GoogleSignInAuthentication googleAuth = await googleUser.authentication; final AuthCredential credential = GoogleAuthProvider.getCredential( accessToken: googleAuth.accessToken, idToken: googleAuth.idToken, ); var signInResult = await _auth.signInWithCredential(credential); final FirebaseUser user = signInResult.user; print("signed in " + user.displayName); return user; } void _signInAnonymously() { _auth.signInAnonymously().then((value) { if (value.user != null) { _proceedToMainScreen(); } }); } }
0
mirrored_repositories/FlutterGREWords/lib/pages
mirrored_repositories/FlutterGREWords/lib/pages/info/gre_info_screen.dart
import 'package:flutter/material.dart'; import '../../theme_data.dart'; class GreInfoScreen extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( elevation: 0.0, backgroundColor: Colors.white, leading: InkWell( child: Icon( Icons.arrow_back_ios, color: Colors.deepPurple, ), onTap: () { Navigator.pop(context); }, ), title: Hero( child: Material( color: Colors.transparent, child: Text( "GRE Info", style: TextStyle( color: CustomThemeData.secondaryColor, fontSize: 22.0, ), ), ), tag: "title4", transitionOnUserGestures: true, ), ), body: ListView( children: <Widget>[ Padding( padding: const EdgeInsets.all(8.0), child: Text( '''The GRE General Test features question types that closely reflect the kind of thinking you'll do in graduate and professional school, including business and law. Verbal Reasoning — Measures the ability to analyze and draw conclusions from discourse, reason from incomplete data, understand multiple levels of meaning, such as literal, figurative and author’s intent, summarize text, distinguish major from minor points, understand the meanings of words, sentences and entire texts, and understand relationships among words and among concepts. There is an emphasis on complex verbal reasoning skills. \nQuantitative Reasoning — Measures the ability to understand, interpret and analyze quantitative information, solve problems using mathematical models, and apply the basic concepts of arithmetic, algebra, geometry and data analysis. There is an emphasis on quantitative reasoning skills. \nAnalytical Writing — Measures critical thinking and analytical writing skills, including the ability to articulate and support complex ideas with relevant reasons and examples, and examine claims and accompanying evidence. There is an emphasis on analytical writing skills.''', style: TextStyle(fontSize: 18.0), ), ), ], ), ); } }
0
mirrored_repositories/FlutterGREWords/lib/pages
mirrored_repositories/FlutterGREWords/lib/pages/info/about_app_screen.dart
import 'package:flutter/material.dart'; import 'package:share/share.dart'; import 'package:url_launcher/url_launcher.dart'; import '../../theme_data.dart'; class AboutAppScreen extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( elevation: 0.0, backgroundColor: Colors.white, leading: InkWell( child: Icon( Icons.arrow_back_ios, color: Colors.deepPurple, ), onTap: () { Navigator.pop(context); }, ), title: Hero( child: Material( color: Colors.transparent, child: Text( "About App", style: TextStyle( color: CustomThemeData.secondaryColor, fontSize: 22.0, ), ), ), tag: "title5", transitionOnUserGestures: true, ), ), body: ListView( children: <Widget>[ Padding( padding: const EdgeInsets.all(16.0), child: Center( child: Card( shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(16.0), ), elevation: 4.0, child: ClipRRect( borderRadius: BorderRadius.circular(16.0), child: Image.asset( 'images/app_logo.png', height: 100.0, width: 100.0, ), ), ), ), ), Padding( padding: const EdgeInsets.all(16.0), child: Text( "GRE One helps you maximise your potential on test day preparing you for vocabulary as well as essays. \n\nFree to use, open source.", style: TextStyle(fontSize: 16.0), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { Share.share( "Maximise your GRE potential with GRE ONE: https://play.google.com/store/apps/details?id=n.dev.fluttergre"); }, child: Text( "Share App", style: TextStyle( color: Colors.white, fontWeight: FontWeight.bold, fontSize: 16.0), ), color: Theme.of(context).primaryColor, padding: EdgeInsets.all(16.0), ), ), Padding( padding: const EdgeInsets.all(16.0), child: Text( "Created by Deven Joshi", style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { _launchURL("https://twitter.com/DevenJoshi7"); }, child: Text( "Twitter", style: TextStyle( color: Colors.white, fontWeight: FontWeight.bold, fontSize: 16.0), ), color: Theme.of(context).primaryColor, padding: EdgeInsets.all(16.0), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { _launchURL("https://www.github.com/deven98"); }, child: Text( "GitHub", style: TextStyle( color: Colors.white, fontWeight: FontWeight.bold, fontSize: 16.0), ), color: Theme.of(context).primaryColor, padding: EdgeInsets.all(16.0), ), ), ], ), ); } _launchURL(String url) async { if (await canLaunch(url)) { await launch(url); } else { throw 'Could not launch $url'; } } }
0
mirrored_repositories/FlutterGREWords/lib
mirrored_repositories/FlutterGREWords/lib/models/essay_model.dart
// To parse this JSON data, do // // final essayModel = essayModelFromJson(jsonString); import 'dart:convert'; //EssayModel essayModelFromJson(String str) => EssayModel.fromJson(json.decode(str)); String essayModelToJson(EssayModel data) => json.encode(data.toJson()); class EssayModel { String question; String type; String text; bool public; String uid; int timestamp; String id; EssayModel({ this.question, this.type, this.text, this.public, this.uid, this.timestamp, this.id, }); factory EssayModel.fromJson(Map<String, dynamic> json, String id) => EssayModel( question: json["question"] == null ? null : json["question"], type: json["type"] == null ? null : json["type"], text: json["text"] == null ? null : json["text"], public: json["public"] == null ? null : json["public"], uid: json["uid"] == null ? null : json["uid"], timestamp: json["timestamp"] == null ? null : json["timestamp"], id: id, ); Map<String, dynamic> toJson() => { "question": question == null ? null : question, "type": type == null ? null : type, "text": text == null ? null : text, "public": public == null ? null : public, "uid": uid == null ? null : uid, "timestamp": timestamp == null ? null : timestamp, }; }
0
mirrored_repositories/FlutterGREWords/lib
mirrored_repositories/FlutterGREWords/lib/data/words.dart
import 'word.dart'; class WordData { static List<Word> greData = [ Word('abate', 'become less in amount or intensity'), Word('chicanery', 'the use of tricks to deceive someone'), Word('disseminate', 'cause to become widely known'), Word('gainsay', 'take exception to'), Word( 'latent', 'potentially existing but not presently evident or realized'), Word('aberrant', 'markedly different from an accepted norm'), Word('coagulate', 'change from a liquid to a thickened or solid state'), Word('dissolution', 'separation into component parts'), Word('garrulous', 'full of trivial conversation'), Word('laud', 'praise, glorify, or honor'), Word('abeyance', 'temporary cessation or suspension'), Word('coda', 'the closing section of a musical composition'), Word('dissonance', 'disagreeable sounds'), Word('goad', 'stab or urge on as if with a pointed stick'), Word('lethargic', 'deficient in alertness or activity'), Word('abscond', 'run away, often taking something or somebody along'), Word('cogent', 'powerfully persuasive'), Word('distend', 'cause to expand as if by internal pressure'), Word('gouge', 'an impression in a surface, as made by a blow'), Word('levee', 'an embankment built to prevent a river from overflowing'), Word('abstemious', 'marked by temperance in indulgence'), Word('commensurate', 'corresponding in size or degree or extent'), Word('distill', 'undergo condensation'), Word('grandiloquent', 'lofty in style'), Word('levity', 'a manner lacking seriousness'), Word('admonish', 'scold or reprimand take to task'), Word('compendium', 'a publication containing a variety of works'), Word('diverge', 'move or draw apart'), Word('gregarious', 'temperamentally seeking and enjoying the company of others'), Word('log', 'a segment of the trunk of a tree when stripped of branches'), Word('adulterate', 'make impure by adding a foreign or inferior substance'), Word('complaisant', 'showing a cheerful willingness to do favors for others'), Word('divest', 'take away possessions from someone'), Word('guileless', 'innocent and free of deceit'), Word('loquacious', 'full of trivial conversation'), Word('aesthetic', 'characterized by an appreciation of beauty or good taste'), Word('compliant', 'disposed to act in accordance with someones wishes'), Word('document', 'a representation of a persons thinking with symbolic marks'), Word('gullible', 'naive and easily deceived or tricked'), Word('lucid', 'transparently clear easily understandable'), Word( 'aggregate', 'a sum total of many heterogeneous things taken together'), Word('conciliatory', 'making or willing to make concessions'), Word('dogmatic', 'pertaining to a code of beliefs accepted as authoritative'), Word('harangue', 'a loud bombastic declamation expressed with strong emotion'), Word('luminous', 'softly bright or radiant'), Word('alacrity', 'liveliness and eagerness'), Word('condone', 'excuse, overlook, or make allowances for'), Word('dormant', 'inactive but capable of becoming active'), Word('homogeneous', 'all of the same or similar kind or nature'), Word('magnanimity', 'nobility and generosity of spirit'), Word('alleviate', 'provide physical relief, as from pain'), Word('confound', 'be confusing or perplexing to'), Word('dupe', 'fool or hoax'), Word('hyperbole', 'extravagant exaggeration'), Word('malingerer', 'someone shirking duty by feigning illness or incapacity'), Word('amalgamate', 'bring or combine together or with something else'), Word('connoisseur', 'an expert able to appreciate a field'), Word('ebullient', 'joyously unrestrained'), Word('iconoclastic', 'characterized by attack on established beliefs'), Word('malleable', 'capable of being shaped or bent'), Word('ambiguous', 'having more than one possible meaning'), Word('contention', 'the act of competing as for profit or a prize'), Word('eclectic', 'selecting what seems best of various styles or ideas'), Word('idolatry', 'the worship of idols or images that are not God'), Word('maverick', 'someone who exhibits independence in thought and action'), Word('ambivalence', 'mixed feelings or emotions'), Word('contentious', 'showing an inclination to disagree'), Word('efficacy', 'capacity or power to produce a desired result'), Word('immutable', 'not subject or susceptible to change or variation'), Word('mendacious', 'given to lying'), Word('ameliorate', 'make better'), Word('contrite', 'feeling or expressing pain or sorrow for sins or offenses'), Word('effrontery', 'audacious behavior that you have no right to'), Word('impair', 'make worse or less effective'), Word('metamorphosis', 'striking change in appearance or character or circumstances'), Word('anachronism', 'locating something at a time when it couldnt have existed'), Word('conundrum', 'a difficult problem'), Word('elegy', 'a mournful poem a lament for the dead'), Word('impassive', 'having or revealing little emotion or sensibility'), Word('meticulous', 'marked by precise accordance with details'), Word('analogous', 'similar or equivalent in some respects'), Word('converge', 'be adjacent or come together'), Word('elicit', 'call forth, as an emotion, feeling, or response'), Word('impede', 'be a hindrance or obstacle to'), Word('misanthrope', 'someone who dislikes people in general'), Word('anarchy', 'a state of lawlessness and disorder'), Word('convoluted', 'highly complex or intricate'), Word('embellish', 'make more attractive, as by adding ornament or color'), Word('impermeable', 'preventing especially liquids to pass or diffuse through'), Word('mitigate', 'lessen or to try to lessen the seriousness or extent of'), Word('anomalous', 'deviating from the general or common order or type'), Word('craven', 'lacking even the rudiments of courage abjectly fearful'), Word('empirical', 'derived from experiment and observation rather than theory'), Word('imperturbable', 'marked by extreme calm and composure'), Word('mollify', 'cause to be more favorably inclined'), Word('antipathy', 'a feeling of intense dislike'), Word('daunt', 'cause to lose courage'), Word('emulate', 'strive to equal or match, especially by imitating'), Word('impervious', 'not admitting of passage or capable of being affected'), Word('morose', 'showing a brooding ill humor'), Word('apathy', 'an absence of emotion or enthusiasm'), Word('decorum', 'propriety in manners and conduct'), Word('endemic', 'native to or confined to a certain region'), Word('implacable', 'incapable of being appeased or pacified'), Word('mundane', 'found in the ordinary course of events'), Word('appease', 'make peace with'), Word('default', 'an option that is selected automatically'), Word('enervate', 'weaken mentally or morally'), Word('implicit', 'suggested though not directly expressed'), Word('negate', 'make ineffective by counterbalancing the effect of'), Word('apprise', 'inform somebody of something'), Word('deference', 'courteous regard for peoples feelings'), Word('engender', 'call forth'), Word('implode', 'burst inward'), Word('neophyte', 'any new participant in some activity'), Word('approbation', 'official acceptance or agreement'), Word('delineate', 'represented accurately or precisely'), Word('enhance', 'increase'), Word('inadvertently', 'without knowledge or intention'), Word('obdurate', 'stubbornly persistent in wrongdoing'), Word( 'appropriate', 'suitable for a particular person, place, or situation'), Word('denigrate', 'charge falsely or with malicious intent'), Word('ephemeral', 'anything short-lived, as an insect that lives only for a day'), Word('inchoate', 'only partly in existence imperfectly formed'), Word('obsequious', 'attempting to win favor from influential people by flattery'), Word('arduous', 'characterized by effort to the point of exhaustion'), Word('deride', 'treat or speak of with contempt'), Word('equanimity', 'steadiness of mind under stress'), Word('incongruity', 'the quality of disagreeing'), Word('obviate', 'do away with'), Word('artless', 'simple and natural without cunning or deceit'), Word('derivative', 'a compound obtained from another compound'), Word('equivocate', 'be deliberately ambiguous or unclear'), Word('inconsequential', 'lacking worth or importance'), Word('occlude', 'block passage through'), Word('ascetic', 'someone who practices self denial as a spiritual discipline'), Word('desiccate', 'lacking vitality or spirit lifeless'), Word('erudite', 'having or showing profound knowledge'), Word('incorporate', 'make into a whole or make part of a whole'), Word('officious', 'intrusive in a meddling or offensive manner'), Word('assiduous', 'marked by care and persistent effort'), Word('desultory', 'marked by lack of definite plan or regularity or purpose'), Word('esoteric', 'understandable only by an enlightened inner circle'), Word('indeterminate', 'not fixed or known in advance'), Word('onerous', 'burdensome or difficult to endure'), Word('assuage', 'provide physical relief, as from pain'), Word('deterrent', 'something immaterial that interferes with action or progress'), Word('eulogy', 'a formal expression of praise for someone who has died'), Word('indigence', 'a state of extreme poverty or destitution'), Word('opprobrium', 'a state of extreme dishonor'), Word('attenuate', 'become weaker, in strength, value, or magnitude'), Word('diatribe', 'thunderous verbal attack'), Word('euphemism', 'an inoffensive expression substituted for an offensive one'), Word('indolent', 'disinclined to work or exertion'), Word('oscillate', 'move or swing from side to side regularly'), Word('audacious', 'disposed to venture or take risks'), Word('dichotomy', 'a classification into two opposed parts or subclasses'), Word('exacerbate', 'make worse'), Word('inert', 'unable to move or resist motion'), Word('ostentatious', 'intended to attract notice and impress others'), Word('austere', 'of a stern or strict bearing or demeanor'), Word('diffidence', 'lack of self-assurance'), Word('exculpate', 'pronounce not guilty of criminal charges'), Word('pate', 'liver or meat or fowl finely minced or ground and variously seasoned'), Word('ingenuous', 'lacking in sophistication or worldliness'), Word('paragon', 'a perfect embodiment of a concept'), Word('autonomous', 'existing as an independent entity'), Word('diffuse', 'spread out not concentrated in one place'), Word('exigency', 'a pressing or urgent situation'), Word('inherent', 'existing as an essential constituent or characteristic'), Word('partisan', 'a fervent and even militant proponent of something'), Word('aver', 'declare or affirm solemnly and formally as true'), Word('digression', 'a message that departs from the main subject'), Word('extrapolation', 'an inference about the future based on known facts'), Word('innocuous', 'not injurious to physical or mental health'), Word('pathological', 'relating to the study of diseases'), Word('banal', 'repeated too often overfamiliar through overuse'), Word('dirge', 'a song or hymn of mourning as a memorial to a dead person'), Word('facetious', 'cleverly amusing in tone'), Word('insensible', 'barely able to be perceived'), Word('paucity', 'an insufficient quantity or number'), Word('belie', 'be in contradiction with'), Word('disabuse', 'free somebody from an erroneous belief'), Word('facilitate', 'make easier'), Word( 'insinuate', 'suggest in an indirect or covert way give to understand'), Word('pedantic', 'marked by a narrow focus on or display of learning'), Word('beneficent', 'doing or producing good'), Word('discerning', 'having or revealing keen insight and good judgment'), Word('fallacious', 'containing or based on incorrect reasoning'), Word('insipid', 'lacking interest or significance or impact'), Word('penchant', 'a strong liking'), Word('bolster', 'support and strengthen'), Word('discordant', 'not in agreement or harmony'), Word('fatuous', 'devoid of intelligence'), Word('insularity', 'the state of being isolated or detached'), Word('penury', 'a state of extreme poverty or destitution'), Word('bombastic', 'ostentatiously lofty in style'), Word('discredit', 'the state of being held in low esteem'), Word('fawning', 'attempting to win favor by flattery'), Word('intractable', 'difficult to manage or mold'), Word('perennial', 'lasting an indefinitely long time'), Word('boorish', 'ill-mannered and coarse in behavior or appearance'), Word('discrepancy', 'a difference between conflicting facts or claims or opinions'), Word('felicitous', 'exhibiting an agreeably appropriate manner or style'), Word('intransigence', 'stubborn refusal to compromise or change'), Word('perfidious', 'tending to betray'), Word('burgeon', 'grow and flourish'), Word('discrete', 'constituting a separate entity or part'), Word('fervor', 'feelings of great warmth and intensity'), Word('inundate', 'fill or cover completely, usually with water'), Word('perfunctory', 'hasty and without attention to detail not thorough'), Word('burnish', 'polish and make shiny'), Word('disingenuous', 'not straightforward or candid'), Word('flag', 'a rectangular piece of cloth of distinctive design'), Word('inured', 'made tough by habitual exposure'), Word('permeable', 'allowing fluids or gases to pass or diffuse through'), Word('buttress', 'a support usually of stone or brick'), Word('disinterested', 'unaffected by concern for ones own welfare'), Word('fledgling', 'young bird that has just become capable of flying'), Word('invective', 'abusive language used to express blame or censure'), Word('pervasive', 'spreading or spread throughout'), Word('cacophonous', 'having an unpleasant sound'), Word('disjointed', 'taken apart at the points of connection'), Word('flout', 'treat with contemptuous disregard'), Word('irascible', 'quickly aroused to anger'), Word('phlegmatic', 'showing little emotion'), Word('capricious', 'determined by chance or impulse rather than by necessity'), Word('dismiss', 'stop associating with'), Word('foment', 'try to stir up'), Word('irresolute', 'uncertain how to act or proceed'), Word('piety', 'righteousness by virtue of being religiously devout'), Word('castigation', 'verbal punishment'), Word('disparage', 'express a negative opinion of'), Word('forestall', 'keep from happening or arising make impossible'), Word('itinerary', 'an established line of travel or access'), Word('placate', 'cause to be more favorably inclined'), Word('catalyst', 'substance that initiates or accelerates a chemical reaction'), Word('disparate', 'fundamentally different or distinct in quality or kind'), Word('frugality', 'prudence in avoiding waste'), Word('laconic', 'brief and to the point'), Word('plasticity', 'the property of being physically malleable'), Word('caustic', 'capable of destroying or eating away by chemical action'), Word('dissemble', 'behave unnaturally or affectedly'), Word('futile', 'producing no result or effect'), Word('lassitude', 'a feeling of lack of interest or energy'), Word('platitude', 'a trite or obvious remark'), Word('plethora', 'extreme excess'), Word('propitiate', 'make peace with'), Word('rescind', 'cancel officially'), Word('sporadic', 'recurring in scattered or unpredictable instances'), Word('tractable', 'easily managed'), Word('plummet', 'drop sharply'), Word('propriety', 'correct behavior'), Word('resolution', 'a decision to do something or to behave in a certain manner'), Word('stigma', 'a symbol of disgrace or infamy'), Word( 'transgression', 'the violation of a law or a duty or moral principle'), Word('porous', 'full of holes'), Word('proscribe', 'command against'), Word('resolve', 'find a solution or answer'), Word('stint', 'supply sparingly and with restricted quantities'), Word('truculence', 'obstreperous and defiant aggressiveness'), Word('pragmatic', 'concerned with practical matters'), Word('pungent', 'strong and sharp to the sense of taste'), Word('reticent', 'reluctant to draw attention to yourself'), Word('stipulate', 'make an express demand or provision in an agreement'), Word('vacillate', 'be undecided about something'), Word('preamble', 'a preliminary introduction to a statute or constitution'), Word('qualified', 'meeting the proper standards and requirements for a task'), Word('reverent', 'feeling or showing profound respect or veneration'), Word('stolid', 'having or revealing little emotion or sensibility'), Word('venerate', 'regard with feelings of respect and reverence'), Word('precarious', 'not secure beset with difficulties'), Word('quibble', 'evade the truth of a point by raising irrelevant objections'), Word('sage', 'a mentor in spiritual and philosophical topics'), Word('striate', 'marked with stripes'), Word('veracious', 'habitually speaking the truth'), Word('precipitate', 'bring about abruptly'), Word('quiescent', 'being quiet or still or inactive'), Word('salubrious', 'promoting health'), Word('strut', 'walk with a lofty proud gait'), Word('verbose', 'using or containing too many words'), Word('precursor', 'something indicating the approach of something or someone'), Word('rarefied', 'of high moral or intellectual value'), Word('sanction', 'official permission or approval'), Word('subpoena', 'a writ issued to compel the attendance of a witness'), Word('viable', 'capable of life or normal growth and development'), Word('presumptuous', 'going beyond what is appropriate, permitted, or courteous'), Word('recalcitrant', 'stubbornly resistant to authority or control'), Word('satiate', 'fill to satisfaction'), Word('subside', 'wear off or die down'), Word('viscous', 'having a relatively high resistance to flow'), Word('prevaricate', 'be deliberately ambiguous or unclear'), Word('recant', 'formally reject or disavow a formerly held belief'), Word('saturate', 'infuse or fill completely'), Word('substantiate', 'establish or strengthen as with new evidence or facts'), Word('vituperative', 'marked by harshly abusive criticism'), Word('pristine', 'immaculately clean and unused'), Word('recluse', 'one who lives in solitude'), Word('savor', 'a particular taste or smell, especially an appealing one'), Word('supersede', 'take the place or move into the position of'), Word('volatile', 'liable to lead to sudden change or violence'), Word('probity', 'complete and confirmed integrity'), Word('recondite', 'difficult to penetrate'), Word('secrete', 'generate and separate from cells or bodily fluids'), Word('supposition', 'the cognitive process of conjecturing'), Word('unwarranted', 'incapable of being justified or explained'), Word('problematic', 'making great mental demands'), Word('refractory', 'stubbornly resistant to authority or control'), Word('shard', 'a broken piece of a brittle artifact'), Word('tacit', 'implied by or inferred from actions or statements'), Word('wary', 'marked by keen caution and watchful prudence'), Word('prodigal', 'recklessly wasteful'), Word('refute', 'overthrow by argument, evidence, or proof'), Word('skeptic', 'someone who habitually doubts accepted beliefs'), Word('tangential', 'of superficial relevance if any'), Word('welter', 'a confused multitude of things'), Word('profound', 'situated at or extending to great depth'), Word('relegate', 'assign to a lower position'), Word('solicitous', 'full of anxiety and concern'), Word('tenuous', 'very thin in gauge or diameter'), Word('whimsical', 'determined by chance or impulse rather than by necessity'), Word('prohibitive', 'tending to discourage, especially of prices'), Word('reproach', 'express criticism towards'), Word('soporific', 'inducing sleep'), Word('tirade', 'a speech of violent denunciation'), Word('zealot', 'a fervent and even militant proponent of something'), Word('proliferate', 'grow rapidly'), Word('reprobate', 'a person without moral scruples'), Word('specious', 'plausible but false'), Word('torpor', 'a state of motor and mental inactivity'), Word('propensity', 'a natural inclination'), Word('repudiate', 'refuse to acknowledge, ratify, or recognize as valid'), Word('spectrum', 'a broad range of related objects, values, or qualities'), Word('tortuous', 'marked by repeated turns and bends'), ]; }
0
mirrored_repositories/FlutterGREWords/lib
mirrored_repositories/FlutterGREWords/lib/data/facts.dart
class FactData { static List<String> facts = [ "The GRE General Test is taken by about 675,000 people from 230 countries each year.", "48% of all GRE test takers have earned undergraduate degrees in quantitatively demanding fields such as engineering, mathematics and the sciences.", "The GRE General Test is available at more than 1,000 test centers in more than 160 countries.", "The GRE has one unscored section for which performance is ignored.", "The GRE was originally scored from 200 to 800 for each section- it is now 130 to 170", "The GRE was established in 1936 by the Carnegie Foundation for the Advancement of Teaching.", "Before October 2002, the GRE had a separate Analytical Ability section which tested candidates on logical and analytical reasoning abilities.", "In 1994, the scoring algorithm for the computer-adaptive form of the GRE was discovered to be insecure.", "The US has the highest number of test takers, followed by India and China.", ]; }
0
mirrored_repositories/FlutterGREWords/lib
mirrored_repositories/FlutterGREWords/lib/data/word.dart
// To parse this JSON data, do // // final word = wordFromJson(jsonString); import 'dart:convert'; Word wordFromJson(String str) { final jsonData = json.decode(str); return Word.fromJson(jsonData); } String wordToJson(Word data) { final dyn = data.toJson(); return json.encode(dyn); } class Word { String wordTitle; String wordDefinition; Word( this.wordTitle, this.wordDefinition, ); factory Word.fromJson(Map<String, dynamic> json) => new Word( json["word_name"], json["word_definition"], ); Map<String, dynamic> toJson() => { "word_name": wordTitle, "word_definition": wordDefinition, }; }
0
mirrored_repositories/FlutterGREWords/lib
mirrored_repositories/FlutterGREWords/lib/data/awa.dart
enum EssayType { issue, argument } class Essay { String question; EssayType type; Essay(this.question, this.type); } var essayData = [ Essay( "To understand the most important characteristics of a society, one must study its major cities. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Educational institutions have a responsibility to dissuade students from pursuing fields of study in which they are unlikely to succeed. Write a response in which you discuss the extent to which you agree or disagree with the claim. In developing and supporting your position, be sure to address the most compelling reasons and/or examples that could be used to challenge your position.", EssayType.issue), Essay( "Scandals are useful because they focus our attention on problems in ways that no speaker or reformer ever could. Write a response in which you discuss the extent to which you agree or disagree with the claim. In developing and supporting your position, be sure to address the most compelling reasons and/or examples that could be used to challenge your position.", EssayType.issue), Essay( "Claim: Governments must ensure that their major cities receive the financial support they need in order to thrive. Reason: It is primarily in cities that a nation's cultural traditions are preserved and generated. Write a response in which you discuss the extent to which you agree or disagree with the claim and the reason on which that claim is based.", EssayType.issue), Essay( "Some people believe that government funding of the arts is necessary to ensure that the arts can flourish and be available to all people. Others believe that government funding of the arts threatens the integrity of the arts. Write a response in which you discuss which view more closely aligns with your own position and explain your reasoning for the position you take. In developing and supporting your position, you should address both of the views presented.", EssayType.issue), Essay( "Claim: In any field — business, politics, education, government — those in power should step down after five years. Reason: The surest path to success for any enterprise is revitalization through new leadership. Write a response in which you discuss the extent to which you agree or disagree with the claim and the reason on which that claim is based.", EssayType.issue), Essay( "In any field of endeavor, it is impossible to make a significant contribution without first being strongly influenced by past achievements within that field. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Nations should pass laws to preserve any remaining wilderness areas in their natural state, even if these areas could be developed for economic gain. Write a response in which you discuss your views on the policy and explain your reasoning for the position you take. In developing and supporting your position, you should consider the possible consequences of implementing the policy and explain how these consequences shape your position.", EssayType.issue), Essay( "People's behavior is largely determined by forces not of their own making. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Governments should offer a free university education to any student who has been admitted to a university but who cannot afford the tuition. Write a response in which you discuss your views on the policy and explain your reasoning for the position you take. In developing and supporting your position, you should consider the possible consequences of implementing the policy and explain how these consequences shape your position.", EssayType.issue), Essay( "Universities should require every student to take a variety of courses outside the student's field of study. Write a response in which you discuss the extent to which you agree or disagree with the claim. In developing and supporting your position, be sure to address the most compelling reasons and/or examples that could be used to challenge your position.", EssayType.issue), Essay( "A nation should require all of its students to study the same national curriculum until they enter college. Write a response in which you discuss your views on the policy and explain your reasoning for the position you take. In developing and supporting your position, you should consider the possible consequences of implementing the policy and explain how these consequences shape your position.", EssayType.issue), Essay( "Educational institutions should actively encourage their students to choose fields of study that will prepare them for lucrative careers. Write a response in which you discuss the extent to which you agree or disagree with the claim. In developing and supporting your position, be sure to address the most compelling reasons and/or examples that could be used to challenge your position.", EssayType.issue), Essay( "Some people believe that in order to be effective, political leaders must yield to public opinion and abandon principle for the sake of compromise. Others believe that the most essential quality of an effective leader is the ability to remain consistently committed to particular principles and objectives. Write a response in which you discuss which view more closely aligns with your own position and explain your reasoning for the position you take. In developing and supporting your position, you should address both of the views presented.", EssayType.issue), Essay( "Formal education tends to restrain our minds and spirits rather than set them free. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "The well-being of a society is enhanced when many of its people question authority. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Governments should focus on solving the immediate problems of today rather than on trying to solve the anticipated problems of the future. Write a response in which you discuss the extent to which you agree or disagree with the recommendation and explain your reasoning for the position you take. In developing and supporting your position, describe specific circumstances in which adopting the recommendation would or would not be advantageous and explain how these examples shape your position.", EssayType.issue), Essay( "Some people believe that college students should consider only their own talents and interests when choosing a field of study. Others believe that college students should base their choice of a field of study on the availability of jobs in that field. Write a response in which you discuss which view more closely aligns with your own position and explain your reasoning for the position you take. In developing and supporting your position, you should address both of the views presented.", EssayType.issue), Essay( "Laws should be flexible enough to take account of various circumstances, times, and places. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Claim: The best way to understand the character of a society is to examine the character of the men and women that the society chooses as its heroes or its role models. Reason: Heroes and role models reveal a society's highest ideals. Write a response in which you discuss the extent to which you agree or disagree with the claim and the reason on which that claim is based.", EssayType.issue), Essay( "Governments should place few, if any, restrictions on scientific research and development. Write a response in which you discuss the extent to which you agree or disagree with the recommendation and explain your reasoning for the position you take. In developing and supporting your position, describe specific circumstances in which adopting the recommendation would or would not be advantageous and explain how these examples shape your position.", EssayType.issue), Essay( "The best way to teach is to praise positive actions and ignore negative ones. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Governments should offer college and university education free of charge to all students. Write a response in which you discuss the extent to which you agree or disagree with the recommendation and explain your reasoning for the position you take. In developing and supporting your position, describe specific circumstances in which adopting the recommendation would or would not be advantageous and explain how these examples shape your position.", EssayType.issue), Essay( "The luxuries and conveniences of contemporary life prevent people from developing into truly strong and independent individuals. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "In any field of inquiry, the beginner is more likely than the expert to make important contributions. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "The surest indicator of a great nation is represented not by the achievements of its rulers, artists, or scientists, but by the general welfare of its people. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "The best way to teach — whether as an educator, employer, or parent — is to praise positive actions and ignore negative ones. Write a response in which you discuss the extent to which you agree or disagree with the claim. In developing and supporting your position, be sure to address the most compelling reasons and/or examples that could be used to challenge your position.", EssayType.issue), Essay( "Teachers' salaries should be based on their students' academic performance. Write a response in which you discuss the extent to which you agree or disagree with the claim. In developing and supporting your position, be sure to address the most compelling reasons and/or examples that could be used to challenge your position.", EssayType.issue), Essay( "Society should make efforts to save endangered species only if the potential extinction of those species is the result of human activities. Write a response in which you discuss your views on the policy and explain your reasoning for the position you take. In developing and supporting your position, you should consider the possible consequences of implementing the policy and explain how these consequences shape your position.", EssayType.issue), Essay( "College students should base their choice of a field of study on the availability of jobs in that field. Write a response in which you discuss the extent to which you agree or disagree with the claim. In developing and supporting your position, be sure to address the most compelling reasons and/or examples that could be used to challenge your position.", EssayType.issue), Essay( "As we acquire more knowledge, things do not become more comprehensible, but more complex and mysterious. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "In any situation, progress requires discussion among people who have contrasting points of view. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Educational institutions should dissuade students from pursuing fields of study in which they are unlikely to succeed. Write a response in which you discuss your views on the policy and explain your reasoning for the position you take. In developing and supporting your position, you should consider the possible consequences of implementing the policy and explain how these consequences shape your position.", EssayType.issue), Essay( "Governments should not fund any scientific research whose consequences are unclear. Write a response in which you discuss the extent to which you agree or disagree with the recommendation and explain your reasoning for the position you take. In developing and supporting your position, describe specific circumstances in which adopting the recommendation would or would not be advantageous and explain how these examples shape your position.", EssayType.issue), Essay( "Society should identify those children who have special talents and provide training for them at an early age to develop their talents. Write a response in which you discuss the extent to which you agree or disagree with the recommendation and explain your reasoning for the position you take. In developing and supporting your position, describe specific circumstances in which adopting the recommendation would or would not be advantageous and explain how these examples shape your position.", EssayType.issue), Essay( "It is primarily through our identification with social groups that we define ourselves. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "College students should be encouraged to pursue subjects that interest them rather than the courses that seem most likely to lead to jobs. Write a response in which you discuss the extent to which you agree or disagree with the recommendation and explain your reasoning for the position you take. In developing and supporting your position, describe specific circumstances in which adopting the recommendation would or would not be advantageous and explain how these examples shape your position.", EssayType.issue), Essay( "Claim: When planning courses, educators should take into account the interests and suggestions of their students. Reason: Students are more motivated to learn when they are interested in what they are studying. Write a response in which you discuss the extent to which you agree or disagree with the claim and the reason on which that claim is based.", EssayType.issue), Essay( "The greatness of individuals can be decided only by those who live after them, not by their contemporaries. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Students should always question what they are taught instead of accepting it passively. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "The increasingly rapid pace of life today causes more problems than it solves. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Claim: It is no longer possible for a society to regard any living man or woman as a hero. Reason: The reputation of anyone who is subjected to media scrutiny will eventually be diminished. Write a response in which you discuss the extent to which you agree or disagree with the claim and the reason on which that claim is based.", EssayType.issue), Essay( "Competition for high grades seriously limits the quality of learning at all levels of education. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Universities should require every student to take a variety of courses outside the student's field of study. Write a response in which you discuss the extent to which you agree or disagree with the recommendation and explain your reasoning for the position you take. In developing and supporting your position, describe specific circumstances in which adopting the recommendation would or would not be advantageous and explain how these examples shape your position.", EssayType.issue), Essay( "Educators should find out what students want included in the curriculum and then offer it to them. Write a response in which you discuss the extent to which you agree or disagree with the recommendation and explain your reasoning for the position you take. In developing and supporting your position, describe specific circumstances in which adopting the recommendation would or would not be advantageous and explain how these examples shape your position.", EssayType.issue), Essay( "Educators should teach facts only after their students have studied the ideas, trends, and concepts that help explain those facts. Write a response in which you discuss the extent to which you agree or disagree with the recommendation and explain your reasoning for the position you take. In developing and supporting your position, describe specific circumstances in which adopting the recommendation would or would not be advantageous and explain how these examples shape your position.", EssayType.issue), Essay( "Claim: We can usually learn much more from people whose views we share than from those whose views contradict our own. Reason: Disagreement can cause stress and inhibit learning. Write a response in which you discuss the extent to which you agree or disagree with the claim and the reason on which that claim is based.", EssayType.issue), Essay( "Government officials should rely on their own judgment rather than unquestioningly carry out the will of the people they serve. Write a response in which you discuss the extent to which you agree or disagree with the recommendation and explain your reasoning for the position you take. In developing and supporting your position, describe specific circumstances in which adopting the recommendation would or would not be advantageous and explain how these examples shape your position.", EssayType.issue), Essay( "Young people should be encouraged to pursue long-term, realistic goals rather than seek immediate fame and recognition. Write a response in which you discuss the extent to which you agree or disagree with the recommendation and explain your reasoning for the position you take. In developing and supporting your position, describe specific circumstances in which adopting the recommendation would or would not be advantageous and explain how these examples shape your position.", EssayType.issue), Essay( "The best way to teach is to praise positive actions and ignore negative ones. Write a response in which you discuss the extent to which you agree or disagree with the recommendation and explain your reasoning for the position you take. In developing and supporting your position, describe specific circumstances in which adopting the recommendation would or would not be advantageous and explain how these examples shape your position.", EssayType.issue), Essay( "If a goal is worthy, then any means taken to attain it are justifiable. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "In order to become well-rounded individuals, all college students should be required to take courses in which they read poetry, novels, mythology, and other types of imaginative literature. Write a response in which you discuss the extent to which you agree or disagree with the recommendation and explain your reasoning for the position you take. In developing and supporting your position, describe specific circumstances in which adopting the recommendation would or would not be advantageous and explain how these examples shape your position.", EssayType.issue), Essay( "In order for any work of art — for example, a film, a novel, a poem, or a song — to have merit, it must be understandable to most people. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Many important discoveries or creations are accidental: it is usually while seeking the answer to one question that we come across the answer to another. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "The main benefit of the study of history is to dispel the illusion that people living now are significantly different from people who lived in earlier times. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Learning is primarily a matter of personal discipline; students cannot be motivated by school or college alone. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Scientists and other researchers should focus their research on areas that are likely to benefit the greatest number of people. Write a response in which you discuss the extent to which you agree or disagree with the recommendation and explain your reasoning for the position you take. In developing and supporting your position, describe specific circumstances in which adopting the recommendation would or would not be advantageous and explain how these examples shape your position.", EssayType.issue), Essay( "Politicians should pursue common ground and reasonable consensus rather than elusive ideals. Write a response in which you discuss the extent to which you agree or disagree with the recommendation and explain your reasoning for the position you take. In developing and supporting your position, describe specific circumstances in which adopting the recommendation would or would not be advantageous and explain how these examples shape your position.", EssayType.issue), Essay( "People should undertake risky action only after they have carefully considered its consequences. Write a response in which you discuss the extent to which you agree or disagree with the recommendation and explain your reasoning for the position you take. In developing and supporting your position, describe specific circumstances in which adopting the recommendation would or would not be advantageous and explain how these examples shape your position.", EssayType.issue), Essay( "Leaders are created by the demands that are placed on them. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "There is little justification for society to make extraordinary efforts — especially at a great cost in money and jobs — to save endangered animal or plant species. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "The human mind will always be superior to machines because machines are only tools of human minds. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "People who are the most deeply committed to an idea or policy are also the most critical of it. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Some people believe that society should try to save every plant and animal species, despite the expense to humans in effort, time, and financial well-being. Others believe that society need not make extraordinary efforts, especially at a great cost in money and jobs, to save endangered species. Write a response in which you discuss which view more closely aligns with your own position and explain your reasoning for the position you take. In developing and supporting your position, you should address both of the views presented.", EssayType.issue), Essay( "Some people believe that the purpose of education is to free the mind and the spirit. Others believe that formal education tends to restrain our minds and spirits rather than set them free. Write a response in which you discuss which view more closely aligns with your own position and explain your reasoning for the position you take. In developing and supporting your position, you should address both of the views presented.", EssayType.issue), Essay( "Some people believe it is often necessary, even desirable, for political leaders to withhold information from the public. Others believe that the public has a right to be fully informed. Write a response in which you discuss which view more closely aligns with your own position and explain your reasoning for the position you take. In developing and supporting your position, you should address both of the views presented.", EssayType.issue), Essay( "Claim: Universities should require every student to take a variety of courses outside the student's major field of study. Reason: Acquiring knowledge of various academic disciplines is the best way to become truly educated. Write a response in which you discuss the extent to which you agree or disagree with the claim and the reason on which that claim is based.", EssayType.issue), Essay( "Young people should be encouraged to pursue long-term, realistic goals rather than seek immediate fame and recognition. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Governments should not fund any scientific research whose consequences are unclear. Write a response in which you discuss your views on the policy and explain your reasoning for the position you take. In developing and supporting your position, you should consider the possible consequences of implementing the policy and explain how these consequences shape your position.", EssayType.issue), Essay( "Knowing about the past cannot help people to make important decisions today. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "In this age of intensive media coverage, it is no longer possible for a society to regard any living man or woman as a hero. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "We can usually learn much more from people whose views we share than from people whose views contradict our own. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "The most effective way to understand contemporary culture is to analyze the trends of its youth. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "People's attitudes are determined more by their immediate situation or surroundings than by society as a whole. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Nations should suspend government funding for the arts when significant numbers of their citizens are hungry or unemployed. Write a response in which you discuss the extent to which you agree or disagree with the recommendation and explain your reasoning for the position you take. In developing and supporting your position, describe specific circumstances in which adopting the recommendation would or would not be advantageous and explain how these examples shape your position.", EssayType.issue), Essay( "All parents should be required to volunteer time to their children's schools. Write a response in which you discuss the extent to which you agree or disagree with the recommendation and explain your reasoning for the position you take. In developing and supporting your position, describe specific circumstances in which adopting the recommendation would or would not be advantageous and explain how these examples shape your position.", EssayType.issue), Essay( "Colleges and universities should require their students to spend at least one semester studying in a foreign country. Write a response in which you discuss the extent to which you agree or disagree with the recommendation and explain your reasoning for the position you take. In developing and supporting your position, describe specific circumstances in which adopting the recommendation would or would not be advantageous and explain how these examples shape your position.", EssayType.issue), Essay( "Teachers' salaries should be based on the academic performance of their students. Write a response in which you discuss the extent to which you agree or disagree with the recommendation and explain your reasoning for the position you take. In developing and supporting your position, describe specific circumstances in which adopting the recommendation would or would not be advantageous and explain how these examples shape your position.", EssayType.issue), Essay( "It is no longer possible for a society to regard any living man or woman as a hero. Write a response in which you discuss the extent to which you agree or disagree with the claim. In developing and supporting your position, be sure to address the most compelling reasons and/or examples that could be used to challenge your position.", EssayType.issue), Essay( "Some people believe that in order to thrive, a society must put its own overall success before the well-being of its individual citizens. Others believe that the well-being of a society can only be measured by the general welfare of all its people. Write a response in which you discuss which view more closely aligns with your own position and explain your reasoning for the position you take. In developing and supporting your position, you should address both of the views presented.", EssayType.issue), Essay( "Claim: Any piece of information referred to as a fact should be mistrusted, since it may well be proven false in the future. Reason: Much of the information that people assume is factual actually turns out to be inaccurate. Write a response in which you discuss the extent to which you agree or disagree with the claim and the reason on which that claim is based.", EssayType.issue), Essay( "Claim: Nations should suspend government funding for the arts when significant numbers of their citizens are hungry or unemployed. Reason: It is inappropriate — and, perhaps, even cruel — to use public resources to fund the arts when people's basic needs are not being met. Write a response in which you discuss the extent to which you agree or disagree with the claim and the reason on which that claim is based.", EssayType.issue), Essay( "Claim: Many problems of modern society cannot be solved by laws and the legal system. Reason: Laws cannot change what is in people's hearts or minds. Write a response in which you discuss the extent to which you agree or disagree with the claim and the reason on which that claim is based.", EssayType.issue), Essay( "Educators should take students' interests into account when planning the content of the courses they teach. Write a response in which you discuss the extent to which you agree or disagree with the recommendation and explain your reasoning for the position you take. In developing and supporting your position, describe specific circumstances in which adopting the recommendation would or would not be advantageous and explain how these examples shape your position.", EssayType.issue), Essay( "The primary goal of technological advancement should be to increase people's efficiency so that they have more leisure time. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Educators should base their assessment of students' learning not on students' grasp of facts but on the ability to explain the ideas, trends, and concepts that those facts illustrate. Write a response in which you discuss the extent to which you agree or disagree with the recommendation and explain your reasoning for the position you take. In developing and supporting your position, describe specific circumstances in which adopting the recommendation would or would not be advantageous and explain how these examples shape your position.", EssayType.issue), Essay( "Unfortunately, in contemporary society, creating an appealing image has become more important than the reality or truth behind that image. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "The effectiveness of a country's leaders is best measured by examining the well-being of that country's citizens. Write a response in which you discuss the extent to which you agree or disagree with the claim. In developing and supporting your position, be sure to address the most compelling reasons and/or examples that could be used to challenge your position.", EssayType.issue), Essay( "All parents should be required to volunteer time to their children's schools. Write a response in which you discuss the extent to which you agree or disagree with the claim. In developing and supporting your position, be sure to address the most compelling reasons and/or examples that could be used to challenge your position.", EssayType.issue), Essay( "A nation should require all of its students to study the same national curriculum until they enter college. Write a response in which you discuss the extent to which you agree or disagree with the claim. In developing and supporting your position, be sure to address the most compelling reasons and/or examples that could be used to challenge your position.", EssayType.issue), Essay( "Colleges and universities should require their students to spend at least one semester studying in a foreign country. Write a response in which you discuss the extent to which you agree or disagree with the claim. In developing and supporting your position, be sure to address the most compelling reasons and/or examples that could be used to challenge your position.", EssayType.issue), Essay( "Educational institutions should actively encourage their students to choose fields of study in which jobs are plentiful. Write a response in which you discuss your views on the policy and explain your reasoning for the position you take. In developing and supporting your position, you should consider the possible consequences of implementing the policy and explain how these consequences shape your position.", EssayType.issue), Essay( "People's behavior is largely determined by forces not of their own making. Write a response in which you discuss the extent to which you agree or disagree with the claim. In developing and supporting your position, be sure to address the most compelling reasons and/or examples that could be used to challenge your position.", EssayType.issue), Essay( "Colleges and universities should require their students to spend at least one semester studying in a foreign country. Write a response in which you discuss your views on the policy and explain your reasoning for the position you take. In developing and supporting your position, you should consider the possible consequences of implementing the policy and explain how these consequences shape your position.", EssayType.issue), Essay( "Although innovations such as video, computers, and the Internet seem to offer schools improved methods for instructing students, these technologies all too often distract from real learning. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Universities should require every student to take a variety of courses outside the student's field of study. Write a response in which you discuss your views on the policy and explain your reasoning for the position you take. In developing and supporting your position, you should consider the possible consequences of implementing the policy and explain how these consequences shape your position.", EssayType.issue), Essay( "The best ideas arise from a passionate interest in commonplace things. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "To be an effective leader, a public official must maintain the highest ethical and moral standards. Write a response in which you discuss the extent to which you agree or disagree with the claim. In developing and supporting your position, be sure to address the most compelling reasons and/or examples that could be used to challenge your position.", EssayType.issue), Essay( "Claim: Imagination is a more valuable asset than experience. Reason: People who lack experience are free to imagine what is possible without the constraints of established habits and attitudes. Write a response in which you discuss the extent to which you agree or disagree with the claim and the reason on which that claim is based.", EssayType.issue), Essay( "In most professions and academic fields, imagination is more important than knowledge. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "To be an effective leader, a public official must maintain the highest ethical and moral standards. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Critical judgment of work in any given field has little value unless it comes from someone who is an expert in that field. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Some people believe that scientific discoveries have given us a much better understanding of the world around us. Others believe that science has revealed to us that the world is infinitely more complex than we ever realized. Write a response in which you discuss which view more closely aligns with your own position and explain your reasoning for the position you take. In developing and supporting your position, you should address both of the views presented.", EssayType.issue), Essay( "Critical judgment of work in any given field has little value unless it comes from someone who is an expert in that field. Write a response in which you discuss the extent to which you agree or disagree with the claim. In developing and supporting your position, be sure to address the most compelling reasons and/or examples that could be used to challenge your position.", EssayType.issue), Essay( "In any profession — business, politics, education, government — those in power should step down after five years. Write a response in which you discuss the extent to which you agree or disagree with the claim. In developing and supporting your position, be sure to address the most compelling reasons and/or examples that could be used to challenge your position.", EssayType.issue), Essay( "Requiring university students to take a variety of courses outside their major fields of study is the best way to ensure that students become truly educated. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Claim: The surest indicator of a great nation is not the achievements of its rulers, artists, or scientists. Reason: The surest indicator of a great nation is actually the welfare of all its people. Write a response in which you discuss the extent to which you agree or disagree with the claim and the reason on which that claim is based.", EssayType.issue), Essay( "Any leader who is quickly and easily influenced by shifts in popular opinion will accomplish little. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Government officials should rely on their own judgment rather than unquestioningly carry out the will of the people whom they serve. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "A nation should require all of its students to study the same national curriculum until they enter college. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "It is primarily in cities that a nation's cultural traditions are generated and preserved. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "We can learn much more from people whose views we share than from people whose views contradict our own. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "When old buildings stand on ground that modern planners feel could be better used for modern purposes, modern development should be given precedence over the preservation of historic buildings. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Claim: The surest indicator of a great nation must be the achievements of its rulers, artists, or scientists. Reason: Great achievements by a nation's rulers, artists, or scientists will ensure a good life for the majority of that nation's people. Write a response in which you discuss the extent to which you agree or disagree with the claim and the reason on which that claim is based.", EssayType.issue), Essay( "Some people claim that you can tell whether a nation is great by looking at the achievements of its rulers, artists, or scientists. Others argue that the surest indicator of a great nation is, in fact, the general welfare of all its people. Write a response in which you discuss which view more closely aligns with your own position and explain your reasoning for the position you take. In developing and supporting your position, you should address both of the views presented.", EssayType.issue), Essay( "The best way to understand the character of a society is to examine the character of the men and women that the society chooses as its heroes or its role models. Write a response in which you discuss the extent to which you agree or disagree with the claim. In developing and supporting your position, be sure to address the most compelling reasons and/or examples that could be used to challenge your position.", EssayType.issue), Essay( "All college and university students would benefit from spending at least one semester studying in a foreign country. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Some people claim that a nation's government should preserve its wilderness areas in their natural state. Others argue that these areas should be developed for potential economic gain. Write a response in which you discuss which view more closely aligns with your own position and explain your reasoning for the position you take. In developing and supporting your position, you should address both of the views presented.", EssayType.issue), Essay( "In most professions and academic fields, imagination is more important than knowledge. Write a response in which you discuss the extent to which you agree or disagree with the claim. In developing and supporting your position, be sure to address the most compelling reasons and/or examples that could be used to challenge your position.", EssayType.issue), Essay( "The surest indicator of a great nation is not the achievements of its rulers, artists, or scientists, but the general well-being of all its people. Write a response in which you discuss the extent to which you agree or disagree with the claim. In developing and supporting your position, be sure to address the most compelling reasons and/or examples that could be used to challenge your position.", EssayType.issue), Essay( "Some people argue that successful leaders in government, industry, or other fields must be highly competitive. Other people claim that in order to be successful, a leader must be willing and able to cooperate with others. Write a response in which you discuss which view more closely aligns with your own position and explain your reasoning for the position you take. In developing and supporting your position, you should address both of the views presented.", EssayType.issue), Essay( "College students should base their choice of a field of study on the availability of jobs in that field. Write a response in which you discuss the extent to which you agree or disagree with the recommendation and explain your reasoning for the position you take. In developing and supporting your position, describe specific circumstances in which adopting the recommendation would or would not be advantageous and explain how these examples shape your position.", EssayType.issue), Essay( "Some people believe that corporations have a responsibility to promote the well-being of the societies and environments in which they operate. Others believe that the only responsibility of corporations, provided they operate within the law, is to make as much money as possible. Write a response in which you discuss which view more closely aligns with your own position and explain your reasoning for the position you take. In developing and supporting your position, you should address both of the views presented.", EssayType.issue), Essay( "Claim: Researchers should not limit their investigations to only those areas in which they expect to discover something that has an immediate, practical application. Reason: It is impossible to predict the outcome of a line of research with any certainty. Write a response in which you discuss the extent to which you agree or disagree with the claim and the reason on which that claim is based.", EssayType.issue), Essay( "Some people believe that our ever-increasing use of technology significantly reduces our opportunities for human interaction. Other people believe that technology provides us with new and better ways to communicate and connect with one another. Write a response in which you discuss which view more closely aligns with your own position and explain your reasoning for the position you take. In developing and supporting your position, you should address both of the views presented.", EssayType.issue), Essay( "Claim: Knowing about the past cannot help people to make important decisions today. Reason: The world today is significantly more complex than it was even in the relatively recent past. Write a response in which you discuss the extent to which you agree or disagree with the claim and the reason on which that claim is based.", EssayType.issue), Essay( "Claim: Knowing about the past cannot help people to make important decisions today. Reason: We are not able to make connections between current events and past events until we have some distance from both. Write a response in which you discuss the extent to which you agree or disagree with the claim and the reason on which that claim is based.", EssayType.issue), Essay( "Educational institutions should actively encourage their students to choose fields of study that will prepare them for lucrative careers. Write a response in which you discuss your views on the policy and explain your reasoning for the position you take. In developing and supporting your position, you should consider the possible consequences of implementing the policy and explain how these consequences shape your position.", EssayType.issue), Essay( "Educational institutions should actively encourage their students to choose fields of study in which jobs are plentiful. Write a response in which you discuss the extent to which you agree or disagree with the claim. In developing and supporting your position, be sure to address the most compelling reasons and/or examples that could be used to challenge your position.", EssayType.issue), Essay( "Educational institutions have a responsibility to dissuade students from pursuing fields of study in which they are unlikely to succeed. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Some people believe that competition for high grades motivates students to excel in the classroom. Others believe that such competition seriously limits the quality of real learning. Write a response in which you discuss which view more closely aligns with your own position and explain your reasoning for the position you take. In developing and supporting your position, you should address both of the views presented.", EssayType.issue), Essay( "Claim: Major policy decisions should always be left to politicians and other government experts. Reason: Politicians and other government experts are more informed and thus have better judgment and perspective than do members of the general public. Write a response in which you discuss the extent to which you agree or disagree with the claim and the reason on which that claim is based.", EssayType.issue), Essay( "Some people believe that universities should require every student to take a variety of courses outside the student's field of study. Others believe that universities should not force students to take any courses other than those that will help prepare them for jobs in their chosen fields. Write a response in which you discuss which view more closely aligns with your own position and explain your reasoning for the position you take. In developing and supporting your position, you should address both of the views presented.", EssayType.issue), Essay( "It is more harmful to compromise one's own beliefs than to adhere to them. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Claim: Colleges and universities should specify all required courses and eliminate elective courses in order to provide clear guidance for students. Reason: College students — like people in general — prefer to follow directions rather than make their own decisions. Write a response in which you discuss the extent to which you agree or disagree with the claim and the reason on which that claim is based.", EssayType.issue), Essay( "No field of study can advance significantly unless it incorporates knowledge and experience from outside that field. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "True success can be measured primarily in terms of the goals one sets for oneself. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "The general welfare of a nation's people is a better indication of that nation's greatness than are the achievements of its rulers, artists, or scientists. Write a response in which you discuss the extent to which you agree or disagree with the claim. In developing and supporting your position, be sure to address the most compelling reasons and/or examples that could be used to challenge your position.", EssayType.issue), Essay( "The best test of an argument is the argument's ability to convince someone with an opposing viewpoint. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "The effectiveness of a country's leaders is best measured by examining the well-being of that country's citizens. Write a response in which you discuss the extent to which you agree or disagree with the statement and explain your reasoning for the position you take. In developing and supporting your position, you should consider ways in which the statement might or might not hold true and explain how these considerations shape your position.", EssayType.issue), Essay( "Nations should pass laws to preserve any remaining wilderness areas in their natural state. Write a response in which you discuss the extent to which you agree or disagree with the claim. In developing and supporting your position, be sure to address the most compelling reasons and/or examples that could be used to challenge your position.", EssayType.issue), Essay( "In any field — business, politics, education, government — those in power should be required to step down after five years. Write a response in which you discuss your views on the policy and explain your reasoning for the position you take. In developing and supporting your position, you should consider the possible consequences of implementing the policy and explain how these consequences shape your position.", EssayType.issue), Essay( "Some people claim that the goal of politics should be the pursuit of an ideal. Others argue that the goal should be finding common ground and reaching reasonable consensus. Write a response in which you discuss which view more closely aligns with your own position and explain your reasoning for the position you take. In developing and supporting your position, you should address both of the views presented.", EssayType.issue), Essay( "The best way to solve environmental problems caused by consumer-generated waste is for towns and cities to impose strict limits on the amount of trash they will accept from each household. Write a response in which you discuss the extent to which you agree or disagree with the claim. In developing and supporting your position, be sure to address the most compelling reasons and/or examples that could be used to challenge your position.", EssayType.issue), Essay( "We learn our most valuable lessons in life from struggling with our limitations rather than from enjoying our successes. Write a response in which you discuss the extent to which you agree or disagree with the claim. In developing and supporting your position, be sure to address the most compelling reasons and/or examples that could be used to challenge your position.", EssayType.issue), Essay( "Claim: While boredom is often expressed with a sense of self-satisfaction, it should really be a source of embarrassment. Reason: Boredom arises from a lack of imagination and self-motivation. Write a response in which you discuss the extent to which you agree or disagree with the claim and the reason on which that claim is based.", EssayType.issue), Essay( "Some people believe that the most important qualities of an effective teacher are understanding and empathy. Others believe that it is more important for teachers to be rigorous and demanding in their expectations for students. Write a response in which you discuss which view more closely aligns with your own position and explain your reasoning for the position you take. In developing and supporting your position, you should address both of the views presented.", EssayType.issue), Essay( "Claim: Though often considered an objective pursuit, learning about the historical past requires creativity. Reason: Because we can never know the past directly, we must reconstruct it by imaginatively interpreting historical accounts, documents, and artifacts. Write a response in which you discuss the extent to which you agree or disagree with the claim and the reason on which the claim is based.", EssayType.issue), Essay( "Claim: No act is done purely for the benefit of others. Reason: All actions — even those that seem to be done for other people — are based on self-interest. Write a response in which you discuss the extent to which you agree or disagree with the claim and the reason on which that claim is based.", EssayType.issue), Essay( "Woven baskets characterized by a particular distinctive pattern have previously been found only in the immediate vicinity of the prehistoric village of Palea and therefore were believed to have been made only by the Palean people. Recently, however, archaeologists discovered such a 'Palean' basket in Lithos, an ancient village across the Brim River from Palea. The Brim River is very deep and broad, and so the ancient Paleans could have crossed it only by boat, and no Palean boats have been found. Thus it follows that the so-called Palean baskets were not uniquely Palean. Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following appeared as part of a letter to the editor of a scientific journal. 'A recent study of eighteen rhesus monkeys provides clues as to the effects of birth order on an individual's levels of stimulation. The study showed that in stimulating situations (such as an encounter with an unfamiliar monkey), firstborn infant monkeys produce up to twice as much of the hormone cortisol, which primes the body for increased activity levels, as do their younger siblings. Firstborn humans also produce relatively high levels of cortisol in stimulating situations (such as the return of a parent after an absence). The study also found that during pregnancy, first-time mother monkeys had higher levels of cortisol than did those who had had several offspring.' Write a response in which you discuss one or more alternative explanations that could rival the proposed explanation and explain how your explanation(s) can plausibly account for the facts presented in the argument.", EssayType.argument), Essay( "The following appeared as a letter to the editor from a Central Plaza store owner. 'Over the past two years, the number of shoppers in Central Plaza has been steadily decreasing while the popularity of skateboarding has increased dramatically. Many Central Plaza store owners believe that the decrease in their business is due to the number of skateboard users in the plaza. There has also been a dramatic increase in the amount of litter and vandalism throughout the plaza. Thus, we recommend that the city prohibit skateboarding in Central Plaza. If skateboarding is prohibited here, we predict that business in Central Plaza will return to its previously high levels.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation is likely to have the predicted result. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared in a letter from a homeowner to a friend. 'Of the two leading real estate firms in our town — Adams Realty and Fitch Realty — Adams Realty is clearly superior. Adams has 40 real estate agents; in contrast, Fitch has 25, many of whom work only part-time. Moreover, Adams' revenue last year was twice as high as that of Fitch and included home sales that averaged \$168,000, compared to Fitch's \$144,000. Homes listed with Adams sell faster as well: ten years ago I listed my home with Fitch, and it took more than four months to sell; last year, when I sold another home, I listed it with Adams, and it took only one month. Thus, if you want to sell your home quickly and at a good price, you should use Adams Realty.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following appeared in a letter to the editor of the Balmer Island Gazette. 'On Balmer Island, where mopeds serve as a popular form of transportation, the population increases to 100,000 during the summer months. To reduce the number of accidents involving mopeds and pedestrians, the town council of Balmer Island should limit the number of mopeds rented by the island's moped rental companies from 50 per day to 25 per day during the summer season. By limiting the number of rentals, the town council will attain the 50 percent annual reduction in moped accidents that was achieved last year on the neighboring island of Seaville, when Seaville's town council enforced similar limits on moped rentals.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation is likely to have the predicted result. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "Arctic deer live on islands in Canada's arctic regions. They search for food by moving over ice from island to island during the course of the year. Their habitat is limited to areas warm enough to sustain the plants on which they feed and cold enough, at least some of the year, for the ice to cover the sea separating the islands, allowing the deer to travel over it. Unfortunately, according to reports from local hunters, the deer populations are declining. Since these reports coincide with recent global warming trends that have caused the sea ice to melt, we can conclude that the purported decline in deer populations is the result of the deer's being unable to follow their age-old migration patterns across the frozen sea. Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following is a recommendation from the Board of Directors of Monarch Books. 'We recommend that Monarch Books open a café in its store. Monarch, having been in business at the same location for more than twenty years, has a large customer base because it is known for its wide selection of books on all subjects. Clearly, opening the café would attract more customers. Space could be made for the café by discontinuing the children's book section, which will probably become less popular given that the most recent national census indicated a significant decline in the percentage of the population under age ten. Opening a café will allow Monarch to attract more customers and better compete with Regal Books, which recently opened its own café.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation is likely to have the predicted result. Be sure to explain how the answers to these questions would help to evaluate the recommendation. ", EssayType.argument), Essay( "The following appeared in a memo from the director of student housing at Buckingham College. 'To serve the housing needs of our students, Buckingham College should build a number of new dormitories. Buckingham's enrollment is growing and, based on current trends, will double over the next 50 years, thus making existing dormitory space inadequate. Moreover, the average rent for an apartment in our town has risen in recent years. Consequently, students will find it increasingly difficult to afford off-campus housing. Finally, attractive new dormitories would make prospective students more likely to enroll at Buckingham.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "Nature's Way, a chain of stores selling health food and other health-related products, is opening its next franchise in the town of Plainsville. The store should prove to be very successful: Nature's Way franchises tend to be most profitable in areas where residents lead healthy lives, and clearly Plainsville is such an area. Plainsville merchants report that sales of running shoes and exercise clothing are at all-time highs. The local health club has more members than ever, and the weight training and aerobics classes are always full. Finally, Plainsville's schoolchildren represent a new generation of potential customers: these schoolchildren are required to participate in a fitness-for-life program, which emphasizes the benefits of regular exercise at an early age. Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "Twenty years ago, Dr. Field, a noted anthropologist, visited the island of Tertia. Using an observation-centered approach to studying Tertian culture, he concluded from his observations that children in Tertia were reared by an entire village rather than by their own biological parents. Recently another anthropologist, Dr. Karp, visited the group of islands that includes Tertia and used the interview-centered method to study child-rearing practices. In the interviews that Dr. Karp conducted with children living in this group of islands, the children spent much more time talking about their biological parents than about other adults in the village. Dr. Karp decided that Dr. Field's conclusion about Tertian village culture must be invalid. Some anthropologists recommend that to obtain accurate information on Tertian child-rearing practices, future research on the subject should be conducted via the interview-centered method. Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The council of Maple County, concerned about the county's becoming overdeveloped, is debating a proposed measure that would prevent the development of existing farmland in the county. But the council is also concerned that such a restriction, by limiting the supply of new housing, could lead to significant increases in the price of housing in the county. Proponents of the measure note that Chestnut County established a similar measure ten years ago, and its housing prices have increased only modestly since. However, opponents of the measure note that Pine County adopted restrictions on the development of new residential housing fifteen years ago, and its housing prices have since more than doubled. The council currently predicts that the proposed measure, if passed, will result in a significant increase in housing prices in Maple County. Write a response in which you discuss what questions would need to be answered in order to decide whether the prediction and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the prediction.", EssayType.argument), Essay( "Fifteen years ago, Omega University implemented a new procedure that encouraged students to evaluate the teaching effectiveness of all their professors. Since that time, Omega professors have begun to assign higher grades in their classes, and overall student grade averages at Omega have risen by 30 percent. Potential employers, looking at this dramatic rise in grades, believe that grades at Omega are inflated and do not accurately reflect student achievement; as a result, Omega graduates have not been as successful at getting jobs as have graduates from nearby Alpha University. To enable its graduates to secure better jobs, Omega University should terminate student evaluation of professors. Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "In an attempt to improve highway safety, Prunty County last year lowered its speed limit from 55 to 45 miles per hour on all county highways. But this effort has failed: the number of accidents has not decreased, and, based on reports by the highway patrol, many drivers are exceeding the speed limit. Prunty County should instead undertake the same kind of road improvement project that Butler County completed five years ago: increasing lane widths, resurfacing rough highways, and improving visibility at dangerous intersections. Today, major Butler County roads still have a 55 mph speed limit, yet there were 25 percent fewer reported accidents in Butler County this past year than there were five years ago. Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following appeared as part of an article in a business magazine. 'A recent study rating 300 male and female Mentian advertising executives according to the average number of hours they sleep per night showed an association between the amount of sleep the executives need and the success of their firms. Of the advertising firms studied, those whose executives reported needing no more than 6 hours of sleep per night had higher profit margins and faster growth. These results suggest that if a business wants to prosper, it should hire only people who need less than 6 hours of sleep per night.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following memorandum is from the business manager of Happy Pancake House restaurants. 'Recently, butter has been replaced by margarine in Happy Pancake House restaurants throughout the southwestern United States. This change, however, has had little impact on our customers. In fact, only about 2 percent of customers have complained, indicating that an average of 98 people out of 100 are happy with the change. Furthermore, many servers have reported that a number of customers who ask for butter do not complain when they are given margarine instead. Clearly, either these customers do not distinguish butter from margarine or they use the term 'butter' to refer to either butter or margarine.' Write a response in which you discuss one or more alternative explanations that could rival the proposed explanation and explain how your explanation(s) can plausibly account for the facts presented in the argument.", EssayType.argument), Essay( "The following appeared in a memorandum from the manager of WWAC radio station. 'To reverse a decline in listener numbers, our owners have decided that WWAC must change from its current rock-music format. The decline has occurred despite population growth in our listening area, but that growth has resulted mainly from people moving here after their retirement. We must make listeners of these new residents. We could switch to a music format tailored to their tastes, but a continuing decline in local sales of recorded music suggests limited interest in music. Instead we should change to a news and talk format, a form of radio that is increasingly popular in our area.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument. ", EssayType.argument), Essay( "The following is a memorandum from the business manager of a television station. 'Over the past year, our late-night news program has devoted increased time to national news and less time to weather and local news. During this period, most of the complaints received from viewers were concerned with our station's coverage of weather and local news. In addition, local businesses that used to advertise during our late-night news program have canceled their advertising contracts with us. Therefore, in order to attract more viewers to our news programs and to avoid losing any further advertising revenues, we should expand our coverage of weather and local news on all our news programs.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "Two years ago, radio station WCQP in Rockville decided to increase the number of call-in advice programs that it broadcast; since that time, its share of the radio audience in the Rockville listening area has increased significantly. Given WCQP's recent success with call-in advice programming, and citing a nationwide survey indicating that many radio listeners are quite interested in such programs, the station manager of KICK in Medway recommends that KICK include more call-in advice programs in an attempt to gain a larger audience share in its listening area. Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared in an article written by Dr. Karp, an anthropologist. 'Twenty years ago, Dr. Field, a noted anthropologist, visited the island of Tertia and concluded from his observations that children in Tertia were reared by an entire village rather than by their own biological parents. However, my recent interviews with children living in the group of islands that includes Tertia show that these children spend much more time talking about their biological parents than about other adults in the village. This research of mine proves that Dr. Field's conclusion about Tertian village culture is invalid and thus that the observation-centered approach to studying cultures is invalid as well. The interview-centered method that my team of graduate students is currently using in Tertia will establish a much more accurate understanding of child-rearing traditions there and in other island cultures.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "According to a recent report, cheating among college and university students is on the rise. However, Groveton College has successfully reduced student cheating by adopting an honor code, which calls for students to agree not to cheat in their academic endeavors and to notify a faculty member if they suspect that others have cheated. Groveton's honor code replaced a system in which teachers closely monitored students; under that system, teachers reported an average of thirty cases of cheating per year. In the first year the honor code was in place, students reported twenty-one cases of cheating; five years later, this figure had dropped to fourteen. Moreover, in a recent survey, a majority of Groveton students said that they would be less likely to cheat with an honor code in place than without. Thus, all colleges and universities should adopt honor codes similar to Groveton's in order to decrease cheating among students. Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared in an article written by Dr. Karp, an anthropologist. 'Twenty years ago, Dr. Field, a noted anthropologist, visited the island of Tertia and concluded from his observations that children in Tertia were reared by an entire village rather than by their own biological parents. However, my recent interviews with children living in the group of islands that includes Tertia show that these children spend much more time talking about their biological parents than about other adults in the village. This research of mine proves that Dr. Field's conclusion about Tertian village culture is invalid and thus that the observation-centered approach to studying cultures is invalid as well. The interview-centered method that my team of graduate students is currently using in Tertia will establish a much more accurate understanding of child-rearing traditions there and in other island cultures.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "A recently issued twenty-year study on headaches suffered by the residents of Mentia investigated the possible therapeutic effect of consuming salicylates. Salicylates are members of the same chemical family as aspirin, a medicine used to treat headaches. Although many foods are naturally rich in salicylates, food-processing companies also add salicylates to foods as preservatives. The twenty-year study found a correlation between the rise in the commercial use of salicylates and a steady decline in the average number of headaches reported by study participants. At the time when the study concluded, food-processing companies had just discovered that salicylates can also be used as flavor additives for foods, and, as a result, many companies plan to do so. Based on these study results, some health experts predict that residents of Mentia will suffer even fewer headaches in the future. Write a response in which you discuss what questions would need to be answered in order to decide whether the prediction and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the prediction.", EssayType.argument), Essay( "The following was written as a part of an application for a small-business loan by a group of developers in the city of Monroe. 'A jazz music club in Monroe would be a tremendously profitable enterprise. Currently, the nearest jazz club is 65 miles away; thus, the proposed new jazz club in Monroe, the C-Note, would have the local market all to itself. Plus, jazz is extremely popular in Monroe: over 100,000 people attended Monroe's annual jazz festival last summer; several well-known jazz musicians live in Monroe; and the highest-rated radio program in Monroe is 'Jazz Nightly,' which airs every weeknight at 7 P.M. Finally, a nationwide study indicates that the typical jazz fan spends close to \$1,000 per year on jazz entertainment.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following appeared in the summary of a study on headaches suffered by the residents of Mentia. 'Salicylates are members of the same chemical family as aspirin, a medicine used to treat headaches. Although many foods are naturally rich in salicylates, for the past several decades, food-processing companies have also been adding salicylates to foods as preservatives. This rise in the commercial use of salicylates has been found to correlate with a steady decline in the average number of headaches reported by participants in our twenty-year study. Recently, food-processing companies have found that salicylates can also be used as flavor additives for foods. With this new use for salicylates, we can expect a continued steady decline in the number of headaches suffered by the average citizen of Mentia.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following appeared in a letter to the editor of a local newspaper. 'Commuters complain that increased rush-hour traffic on Blue Highway between the suburbs and the city center has doubled their commuting time. The favored proposal of the motorists' lobby is to widen the highway, adding an additional lane of traffic. But last year's addition of a lane to the nearby Green Highway was followed by a worsening of traffic jams on it. A better alternative is to add a bicycle lane to Blue Highway. Many area residents are keen bicyclists. A bicycle lane would encourage them to use bicycles to commute, and so would reduce rush-hour traffic rather than fostering an increase.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following appeared in the summary of a study on headaches suffered by the residents of Mentia. 'Salicylates are members of the same chemical family as aspirin, a medicine used to treat headaches. Although many foods are naturally rich in salicylates, for the past several decades, food-processing companies have also been adding salicylates to foods as preservatives. This rise in the commercial use of salicylates has been found to correlate with a steady decline in the average number of headaches reported by participants in our twenty-year study. Recently, food-processing companies have found that salicylates can also be used as flavor additives for foods. With this new use for salicylates, we can expect a continued steady decline in the number of headaches suffered by the average citizen of Mentia.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following appeared in an editorial in a local newspaper. 'Commuters complain that increased rush-hour traffic on Blue Highway between the suburbs and the city center has doubled their commuting time. The favored proposal of the motorists' lobby is to widen the highway, adding an additional lane of traffic. Opponents note that last year's addition of a lane to the nearby Green Highway was followed by a worsening of traffic jams on it. Their suggested alternative proposal is adding a bicycle lane to Blue Highway. Many area residents are keen bicyclists. A bicycle lane would encourage them to use bicycles to commute, it is argued, thereby reducing rush-hour traffic.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared as a recommendation by a committee planning a ten-year budget for the city of Calatrava. 'The birthrate in our city is declining: in fact, last year's birthrate was only one-half that of five years ago. Thus the number of students enrolled in our public schools will soon decrease dramatically, and we can safely reduce the funds budgeted for education during the next decade. At the same time, we can reduce funding for athletic playing fields and other recreational facilities. As a result, we will have sufficient money to fund city facilities and programs used primarily by adults, since we can expect the adult population of the city to increase.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following appeared in a letter to the editor of Parson City's local newspaper. 'In our region of Trillura, the majority of money spent on the schools that most students attend — the city-run public schools — comes from taxes that each city government collects. The region's cities differ, however, in the budgetary priority they give to public education. For example, both as a proportion of its overall tax revenues and in absolute terms, Parson City has recently spent almost twice as much per year as Blue City has for its public schools — even though both cities have about the same number of residents. Clearly, Parson City residents place a higher value on providing a good education in public schools than Blue City residents do.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following appeared in a memo from a vice president of Quiot Manufacturing. 'During the past year, Quiot Manufacturing had 30 percent more on-the-job accidents than at the nearby Panoply Industries plant, where the work shifts are one hour shorter than ours. Experts say that significant contributing factors in many on-the-job accidents are fatigue and sleep deprivation among workers. Therefore, to reduce the number of on-the-job accidents at Quiot and thereby increase productivity, we should shorten each of our three work shifts by one hour so that employees will get adequate amounts of sleep.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following appeared in a memorandum from the planning department of an electric power company. 'Several recent surveys indicate that home owners are increasingly eager to conserve energy. At the same time, manufacturers are now marketing many home appliances, such as refrigerators and air conditioners, that are almost twice as energy efficient as those sold a decade ago. Also, new technologies for better home insulation and passive solar heating are readily available to reduce the energy needed for home heating. Therefore, the total demand for electricity in our area will not increase — and may decline slightly. Since our three electric generating plants in operation for the past twenty years have always met our needs, construction of new generating plants will not be necessary.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The vice president of human resources at Climpson Industries sent the following recommendation to the company's president. 'In an effort to improve our employees' productivity, we should implement electronic monitoring of employees' Internet use from their workstations. Employees who use the Internet from their workstations need to be identified and punished if we are to reduce the number of work hours spent on personal or recreational activities, such as shopping or playing games. By installing software to detect employees' Internet use on company computers, we can prevent employees from wasting time, foster a better work ethic at Climpson, and improve our overall profits.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following appeared in a letter from the owner of the Sunnyside Towers apartment complex to its manager. 'One month ago, all the showerheads in the first three buildings of the Sunnyside Towers complex were modified to restrict maximum water flow to one-third of what it used to be. Although actual readings of water usage before and after the adjustment are not yet available, the change will obviously result in a considerable savings for Sunnyside Corporation, since the corporation must pay for water each month. Except for a few complaints about low water pressure, no problems with showers have been reported since the adjustment. I predict that modifying showerheads to restrict water flow throughout all twelve buildings in the Sunnyside Towers complex will increase our profits even more dramatically.' Write a response in which you discuss what questions would need to be answered in order to decide whether the prediction and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the prediction.", EssayType.argument), Essay( "The following report appeared in the newsletter of the West Meria Public Health Council. 'An innovative treatment has come to our attention that promises to significantly reduce absenteeism in our schools and workplaces. A study reports that in nearby East Meria, where fish consumption is very high, people visit the doctor only once or twice per year for the treatment of colds. Clearly, eating a substantial amount of fish can prevent colds. Since colds represent the most frequently given reason for absences from school and work, we recommend the daily use of Ichthaid — a nutritional supplement derived from fish oil — as a good way to prevent colds and lower absenteeism.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following appeared in a recommendation from the planning department of the city of Transopolis. 'Ten years ago, as part of a comprehensive urban renewal program, the city of Transopolis adapted for industrial use a large area of severely substandard housing near the freeway. Subsequently, several factories were constructed there, crime rates in the area declined, and property tax revenues for the entire city increased. To further revitalize the city, we should now take similar action in a declining residential area on the opposite side of the city. Since some houses and apartments in existing nearby neighborhoods are currently unoccupied, alternate housing for those displaced by this action will be readily available.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following appeared in a memo from the new vice president of Sartorian, a company that manufactures men's clothing. 'Five years ago, at a time when we had difficulties in obtaining reliable supplies of high quality wool fabric, we discontinued production of our alpaca overcoat. Now that we have a new fabric supplier, we should resume production. This coat should sell very well: since we have not offered an alpaca overcoat for five years and since our major competitor no longer makes an alpaca overcoat, there will be pent-up customer demand. Also, since the price of most types of clothing has increased in each of the past five years, customers should be willing to pay significantly higher prices for alpaca overcoats than they did five years ago, and our company profits will increase.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "A recent sales study indicates that consumption of seafood dishes in Bay City restaurants has increased by 30 percent during the past five years. Yet there are no currently operating city restaurants whose specialty is seafood. Moreover, the majority of families in Bay City are two-income families, and a nationwide study has shown that such families eat significantly fewer home-cooked meals than they did a decade ago but at the same time express more concern about healthful eating. Therefore, the new Captain Seafood restaurant that specializes in seafood should be quite popular and profitable. Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "Milk and dairy products are rich in vitamin D and calcium — substances essential for building and maintaining bones. Many people therefore say that a diet rich in dairy products can help prevent osteoporosis, a disease that is linked to both environmental and genetic factors and that causes the bones to weaken significantly with age. But a long-term study of a large number of people found that those who consistently consumed dairy products throughout the years of the study have a higher rate of bone fractures than any other participants in the study. Since bone fractures are symptomatic of osteoporosis, this study result shows that a diet rich in dairy products may actually increase, rather than decrease, the risk of osteoporosis. Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following appeared in a health newsletter. 'A ten-year nationwide study of the effectiveness of wearing a helmet while bicycling indicates that ten years ago, approximately 35 percent of all bicyclists reported wearing helmets, whereas today that number is nearly 80 percent. Another study, however, suggests that during the same ten-year period, the number of bicycle-related accidents has increased 200 percent. These results demonstrate that bicyclists feel safer because they are wearing helmets, and they take more risks as a result. Thus, to reduce the number of serious injuries from bicycle accidents, the government should concentrate more on educating people about bicycle safety and less on encouraging or requiring bicyclists to wear helmets.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following is a letter to the head of the tourism bureau on the island of Tria. 'Erosion of beach sand along the shores of Tria Island is a serious threat to our island and our tourist industry. In order to stop the erosion, we should charge people for using the beaches. Although this solution may annoy a few tourists in the short term, it will raise money for replenishing the sand. Replenishing the sand, as was done to protect buildings on the nearby island of Batia, will help protect buildings along our shores, thereby reducing these buildings' risk of additional damage from severe storms. And since beaches and buildings in the area will be preserved, Tria's tourist industry will improve over the long term.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following appeared in a memorandum written by the chairperson of the West Egg Town Council. 'Two years ago, consultants predicted that West Egg's landfill, which is used for garbage disposal, would be completely filled within five years. During the past two years, however, the town's residents have been recycling twice as much material as they did in previous years. Next month the amount of recycled material — which includes paper, plastic, and metal — should further increase, since charges for pickup of other household garbage will double. Furthermore, over 90 percent of the respondents to a recent survey said that they would do more recycling in the future. Because of our town's strong commitment to recycling, the available space in our landfill should last for considerably longer than predicted.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following appeared in a letter to the editor of a journal on environmental issues. 'Over the past year, the Crust Copper Company (CCC) has purchased over 10,000 square miles of land in the tropical nation of West Fredonia. Mining copper on this land will inevitably result in pollution and, since West Fredonia is the home of several endangered animal species, in environmental disaster. But such disasters can be prevented if consumers simply refuse to purchase products that are made with CCC's copper unless the company abandons its mining plans.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following is part of a memorandum from the president of Humana University. 'Last year the number of students who enrolled in online degree programs offered by nearby Omni University increased by 50 percent. During the same year, Omni showed a significant decrease from prior years in expenditures for dormitory and classroom space, most likely because instruction in the online programs takes place via the Internet. In contrast, over the past three years, enrollment at Humana University has failed to grow, and the cost of maintaining buildings has increased along with our budget deficit. To address these problems, Humana University will begin immediately to create and actively promote online degree programs like those at Omni. We predict that instituting these online degree programs will help Humana both increase its total enrollment and solve its budget problems.' Write a response in which you discuss what questions would need to be answered in order to decide whether the prediction and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the prediction.", EssayType.argument), Essay( "The following appeared in a memorandum from the owner of Movies Galore, a chain of movie-rental stores. 'Because of declining profits, we must reduce operating expenses at Movies Galore's ten movie-rental stores. Raising prices is not a good option, since we are famous for our low prices. Instead, we should reduce our operating hours. Last month our store in downtown Marston reduced its hours by closing at 6:00 p.m. rather than 9:00 p.m. and reduced its overall inventory by no longer stocking any DVD released more than five years ago. Since we have received very few customer complaints about these new policies, we should now adopt them at all other Movies Galore stores as our best strategies for improving profits.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following appeared in a magazine article about planning for retirement. 'Clearview should be a top choice for anyone seeking a place to retire, because it has spectacular natural beauty and a consistent climate. Another advantage is that housing costs in Clearview have fallen significantly during the past year, and taxes remain lower than those in neighboring towns. Moreover, Clearview's mayor promises many new programs to improve schools, streets, and public services. And best of all, retirees in Clearview can also expect excellent health care as they grow older, since the number of physicians in the area is far greater than the national average.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following is part of a memorandum from the president of Humana University. 'Last year the number of students who enrolled in online degree programs offered by nearby Omni University increased by 50 percent. During the same year, Omni showed a significant decrease from prior years in expenditures for dormitory and classroom space, most likely because online instruction takes place via the Internet. In contrast, over the past three years, enrollment at Humana University has failed to grow and the cost of maintaining buildings has increased. Thus, to increase enrollment and solve the problem of budget deficits at Humana University, we should initiate and actively promote online degree programs like those at Omni.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "An ancient, traditional remedy for insomnia — the scent of lavender flowers — has now been proved effective. In a recent study, 30 volunteers with chronic insomnia slept each night for three weeks on lavender-scented pillows in a controlled room where their sleep was monitored electronically. During the first week, volunteers continued to take their usual sleeping medication. They slept soundly but wakened feeling tired. At the beginning of the second week, the volunteers discontinued their sleeping medication. During that week, they slept less soundly than the previous week and felt even more tired. During the third week, the volunteers slept longer and more soundly than in the previous two weeks. Therefore, the study proves that lavender cures insomnia within a short period of time. Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following memorandum is from the business manager of Happy Pancake House restaurants. 'Butter has now been replaced by margarine in Happy Pancake House restaurants throughout the southwestern United States. Only about 2 percent of customers have complained, indicating that 98 people out of 100 are happy with the change. Furthermore, many servers have reported that a number of customers who ask for butter do not complain when they are given margarine instead. Clearly, either these customers cannot distinguish butter from margarine or they use the term 'butter' to refer to either butter or margarine. Thus, to avoid the expense of purchasing butter and to increase profitability, the Happy Pancake House should extend this cost-saving change to its restaurants in the southeast and northeast as well.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation is likely to have the predicted result. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared in a letter from the owner of the Sunnyside Towers apartment building to its manager. 'One month ago, all the showerheads on the first five floors of Sunnyside Towers were modified to restrict the water flow to approximately one-third of its original flow. Although actual readings of water usage before and after the adjustment are not yet available, the change will obviously result in a considerable savings for Sunnyside Corporation, since the corporation must pay for water each month. Except for a few complaints about low water pressure, no problems with showers have been reported since the adjustment. Clearly, restricting water flow throughout all the twenty floors of Sunnyside Towers will increase our profits further.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation is likely to have the predicted result. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared in a health magazine. 'The citizens of Forsythe have adopted more healthful lifestyles. Their responses to a recent survey show that in their eating habits they conform more closely to government nutritional recommendations than they did ten years ago. Furthermore, there has been a fourfold increase in sales of food products containing kiran, a substance that a scientific study has shown reduces cholesterol. This trend is also evident in reduced sales of sulia, a food that few of the most healthy citizens regularly eat.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "Humans arrived in the Kaliko Islands about 7,000 years ago, and within 3,000 years most of the large mammal species that had lived in the forests of the Kaliko Islands had become extinct. Yet humans cannot have been a factor in the species' extinctions, because there is no evidence that the humans had any significant contact with the mammals. Further, archaeologists have discovered numerous sites where the bones of fish had been discarded, but they found no such areas containing the bones of large mammals, so the humans cannot have hunted the mammals. Therefore, some climate change or other environmental factor must have caused the species' extinctions. Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following appeared in an editorial in a business magazine. 'Although the sales of Whirlwind video games have declined over the past two years, a recent survey of video-game players suggests that this sales trend is about to be reversed. The survey asked video-game players what features they thought were most important in a video game. According to the survey, players prefer games that provide lifelike graphics, which require the most up-to-date computers. Whirlwind has just introduced several such games with an extensive advertising campaign directed at people ten to twenty-five years old, the age-group most likely to play video games. It follows, then, that the sales of Whirlwind video games are likely to increase dramatically in the next few months.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following appeared in a memo from the vice president of marketing at Dura-Sock, Inc. 'A recent study of our customers suggests that our company is wasting the money it spends on its patented Endure manufacturing process, which ensures that our socks are strong enough to last for two years. We have always advertised our use of the Endure process, but the new study shows that despite our socks' durability, our average customer actually purchases new Dura-Socks every three months. Furthermore, our customers surveyed in our largest market, northeastern United States cities, say that they most value Dura-Socks' stylish appearance and availability in many colors. These findings suggest that we can increase our profits by discontinuing use of the Endure manufacturing process.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following appeared in a memo from the vice president of marketing at Dura-Sock, Inc. 'A recent study of our customers suggests that our company is wasting the money it spends on its patented Endure manufacturing process, which ensures that our socks are strong enough to last for two years. We have always advertised our use of the Endure process, but the new study shows that despite our socks' durability, our average customer actually purchases new Dura-Socks every three months. Furthermore, our customers surveyed in our largest market, northeastern United States cities, say that they most value Dura-Socks' stylish appearance and availability in many colors. These findings suggest that we can increase our profits by discontinuing use of the Endure manufacturing process.'", EssayType.argument), Essay( "Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument. The vice president for human resources at Climpson Industries sent the following recommendation to the company's president. 'In an effort to improve our employees' productivity, we should implement electronic monitoring of employees' Internet use from their workstations. Employees who use the Internet inappropriately from their workstations need to be identified and punished if we are to reduce the number of work hours spent on personal or recreational activities, such as shopping or playing games. Installing software on company computers to detect employees' Internet use is the best way to prevent employees from wasting time on the job. It will foster a better work ethic at Climpson and improve our overall profits.'", EssayType.argument), Essay( "Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument. The following appeared in a memo from the president of Bower Builders, a company that constructs new homes. 'A nationwide survey reveals that the two most-desired home features are a large family room and a large, well-appointed kitchen. A number of homes in our area built by our competitor Domus Construction have such features and have sold much faster and at significantly higher prices than the national average. To boost sales and profits, we should increase the size of the family rooms and kitchens in all the homes we build and should make state-of-the-art kitchens a standard feature. Moreover, our larger family rooms and kitchens can come at the expense of the dining room, since many of our recent buyers say they do not need a separate dining room for family meals.'", EssayType.argument), Essay( "Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted. The following appeared in a letter from a firm providing investment advice for a client. 'Most homes in the northeastern United States, where winters are typically cold, have traditionally used oil as their major fuel for heating. Last heating season that region experienced 90 days with below-normal temperatures, and climate forecasters predict that this weather pattern will continue for several more years. Furthermore, many new homes are being built in the region in response to recent population growth. Because of these trends, we predict an increased demand for heating oil and recommend investment in Consolidated Industries, one of whose major business operations is the retail sale of home heating oil.'", EssayType.argument), Essay( "Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted. The following appeared in an article in the Grandview Beacon. 'For many years the city of Grandview has provided annual funding for the Grandview Symphony. Last year, however, private contributions to the symphony increased by 200 percent and attendance at the symphony's concerts-in-the-park series doubled. The symphony has also announced an increase in ticket prices for next year. Given such developments, some city commissioners argue that the symphony can now be fully self-supporting, and they recommend that funding for the symphony be eliminated from next year's budget.'", EssayType.argument), Essay( "Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the recommendation. The following appeared in a memo from the director of a large group of hospitals. 'In a laboratory study of liquid antibacterial hand soaps, a concentrated solution of UltraClean produced a 40 percent greater reduction in the bacteria population than did the liquid hand soaps currently used in our hospitals. During a subsequent test of UltraClean at our hospital in Workby, that hospital reported significantly fewer cases of patient infection than did any of the other hospitals in our group. Therefore, to prevent serious patient infections, we should supply UltraClean at all hand-washing stations throughout our hospital system.'", EssayType.argument), Essay( "Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted. The following appeared in a letter to the editor of the Parkville Daily newspaper. 'Throughout the country last year, as more and more children below the age of nine participated in youth-league sports, over 40,000 of these young players suffered injuries. When interviewed for a recent study, youth-league soccer players in several major cities also reported psychological pressure exerted by coaches and parents to win games. Furthermore, education experts say that long practice sessions for these sports take away time that could be used for academic activities. Since the disadvantages outweigh any advantages, we in Parkville should discontinue organized athletic competition for children under nine.'", EssayType.argument), Essay( "Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted. When Stanley Park first opened, it was the largest, most heavily used public park in town. It is still the largest park, but it is no longer heavily used. Video cameras mounted in the park's parking lots last month revealed the park's drop in popularity: the recordings showed an average of only 50 cars per day. In contrast, tiny Carlton Park in the heart of the business district is visited by more than 150 people on a typical weekday. An obvious difference is that Carlton Park, unlike Stanley Park, provides ample seating. Thus, if Stanley Park is ever to be as popular with our citizens as Carlton Park, the town will obviously need to provide more benches, thereby converting some of the unused open areas into spaces suitable for socializing.", EssayType.argument), Essay( "Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted. The following appeared in a memo from the owner of a chain of cheese stores located throughout the United States. 'For many years all the stores in our chain have stocked a wide variety of both domestic and imported cheeses. Last year, however, all of the five best-selling cheeses at our newest store were domestic cheddar cheeses from Wisconsin. Furthermore, a recent survey by Cheeses of the World magazine indicates an increasing preference for domestic cheeses among its subscribers. Since our company can reduce expenses by limiting inventory, the best way to improve profits in all of our stores is to discontinue stocking many of our varieties of imported cheese and concentrate primarily on domestic cheeses.'", EssayType.argument), Essay( "Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation is likely to have the predicted result. Be sure to explain how the answers to these questions would help to evaluate the recommendation. The following appeared as part of a business plan developed by the manager of the Rialto Movie Theater. 'Despite its downtown location, the Rialto Movie Theater, a local institution for five decades, must make big changes or close its doors forever. It should follow the example of the new Apex Theater in the mall outside of town. When the Apex opened last year, it featured a video arcade, plush carpeting and seats, and a state-of-the-art sound system. Furthermore, in a recent survey, over 85 percent of respondents reported that the high price of newly released movies prevents them from going to the movies more than five times per year. Thus, if the Rialto intends to hold on to its share of a decreasing pool of moviegoers, it must offer the same features as Apex.'", EssayType.argument), Essay( "Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation is likely to have the predicted result. Be sure to explain how the answers to these questions would help to evaluate the recommendation. A recent study reported that pet owners have longer, healthier lives on average than do people who own no pets. Specifically, dog owners tend to have a lower incidence of heart disease. In light of these findings, Sherwood Hospital should form a partnership with Sherwood Animal Shelter to institute an adopt-a-dog program. The program would encourage dog ownership for patients recovering from heart disease, which should reduce these patients' chance of experiencing continuing heart problems and also reduce their need for ongoing treatment. As a further benefit, the publicity about the program would encourage more people to adopt pets from the shelter. And that will reduce the incidence of heart disease in the general population.", EssayType.argument), Essay( "Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted. The following appeared in a memo from a vice president of a large, highly diversified company. 'Ten years ago our company had two new office buildings constructed as regional headquarters for two regions. The buildings were erected by different construction companies — Alpha and Zeta. Although the two buildings had identical floor plans, the building constructed by Zeta cost 30 percent more to build. However, that building's expenses for maintenance last year were only half those of Alpha's. In addition, the energy consumption of the Zeta building has been lower than that of the Alpha building every year since its construction. Given these data, plus the fact that Zeta has a stable workforce with little employee turnover, we recommend using Zeta rather than Alpha for our new building project, even though Alpha's bid promises lower construction costs.'", EssayType.argument), Essay( "Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the recommendation. The following appeared in a memo from a vice president of a large, highly diversified company. 'Ten years ago our company had two new office buildings constructed as regional headquarters for two regions. The buildings were erected by different construction companies — Alpha and Zeta. Although the two buildings had identical floor plans, the building constructed by Zeta cost 30 percent more to build. However, that building's expenses for maintenance last year were only half those of Alpha's. Furthermore, the energy consumption of the Zeta building has been lower than that of the Alpha building every year since its construction. Such data indicate that we should use Zeta rather than Alpha for our contemplated new building project, even though Alpha's bid promises lower construction costs.'", EssayType.argument), Essay( "Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument. The following is a letter to the editor of the Waymarsh Times. 'Traffic here in Waymarsh is becoming a problem. Although just three years ago a state traffic survey showed that the typical driving commuter took 20 minutes to get to work, the commute now takes closer to 40 minutes, according to the survey just completed. Members of the town council already have suggested more road building to address the problem, but as well as being expensive, the new construction will surely disrupt some of our residential neighborhoods. It would be better to follow the example of the nearby city of Garville. Last year Garville implemented a policy that rewards people who share rides to work, giving them coupons for free gas. Pollution levels in Garville have dropped since the policy was implemented, and people from Garville tell me that commuting times have fallen considerably. There is no reason why a policy like Garville's shouldn't work equally well in Waymarsh.'", EssayType.argument), Essay( "Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument. The following appeared as a letter to the editor of a national newspaper. 'Your recent article on corporate downsizing* in Elthyria maintains that the majority of competent workers who have lost jobs as a result of downsizing face serious economic hardship, often for years, before finding other suitable employment. But this claim is undermined by a recent report on the Elthyrian economy, which found that since 1999 far more jobs have been created than have been eliminated, bringing the unemployment rate in Elthyria to its lowest level in decades. Moreover, two-thirds of these newly created jobs have been in industries that tend to pay above-average wages, and the vast majority of these jobs are full-time.'", EssayType.argument), Essay( "*Downsizing is the process whereby corporations deliberately make themselves smaller, reducing the number of their employees. Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following appeared in a letter to the editor of a Batavia newspaper. 'The department of agriculture in Batavia reports that the number of dairy farms throughout the country is now 25 percent greater than it was 10 years ago. During this same time period, however, the price of milk at the local Excello Food Market has increased from \$1.50 to over \$3.00 per gallon. To prevent farmers from continuing to receive excessive profits on an apparently increased supply of milk, the Batavia government should begin to regulate retail milk prices. Such regulation is necessary to ensure fair prices for consumers.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation is likely to have the predicted result. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared in a newsletter offering advice to investors. 'Over 80 percent of the respondents to a recent survey indicated a desire to reduce their intake of foods containing fats and cholesterol, and today low-fat products abound in many food stores. Since many of the food products currently marketed by Old Dairy Industries are high in fat and cholesterol, the company's sales are likely to diminish greatly and company profits will no doubt decrease. We therefore advise Old Dairy stockholders to sell their shares, and other investors not to purchase stock in this company.' Write a response in which you discuss what questions would need to be answered in order to decide whether the advice and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the advice.", EssayType.argument), Essay( "The following recommendation appeared in a memo from the mayor of the town of Hopewell. 'Two years ago, the nearby town of Ocean View built a new municipal golf course and resort hotel. During the past two years, tourism in Ocean View has increased, new businesses have opened there, and Ocean View's tax revenues have risen by 30 percent. Therefore, the best way to improve Hopewell's economy — and generate additional tax revenues — is to build a golf course and resort hotel similar to those in Ocean View.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following appeared in a memo from the vice president of a food distribution company with food storage warehouses in several cities. 'Recently, we signed a contract with the Fly-Away Pest Control Company to provide pest control services at our fast-food warehouse in Palm City, but last month we discovered that over \$20,000 worth of food there had been destroyed by pest damage. Meanwhile, the Buzzoff Pest Control Company, which we have used for many years, continued to service our warehouse in Wintervale, and last month only \$10,000 worth of the food stored there had been destroyed by pest damage. Even though the price charged by Fly-Away is considerably lower, our best means of saving money is to return to Buzzoff for all our pest control services.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "Since those issues of Newsbeat magazine that featured political news on their front cover were the poorest-selling issues over the past three years, the publisher of Newsbeat has recommended that the magazine curtail its emphasis on politics to focus more exclusively on economics and personal finance. She points to a recent survey of readers of general interest magazines that indicates greater reader interest in economic issues than in political ones. Newsbeat's editor, however, opposes the proposed shift in editorial policy, pointing out that very few magazines offer extensive political coverage anymore. Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared in a business magazine. 'As a result of numerous complaints of dizziness and nausea on the part of consumers of Promofoods tuna, the company requested that eight million cans of its tuna be returned for testing. Promofoods concluded that the canned tuna did not, after all, pose a health risk. This conclusion is based on tests performed on samples of the recalled cans by chemists from Promofoods; the chemists found that of the eight food chemicals most commonly blamed for causing symptoms of dizziness and nausea, five were not found in any of the tested cans. The chemists did find small amounts of the three remaining suspected chemicals but pointed out that these occur naturally in all canned foods.' Write a response in which you discuss what questions would need to be addressed in order to decide whether the conclusion and the argument on which it is based are reasonable. Be sure to explain how the answers to the questions would help to evaluate the conclusion.", EssayType.argument), Essay( "The following appeared in a memo from the vice president of marketing at Dura-Socks, Inc. 'A recent study of Dura-Socks customers suggests that our company is wasting the money it spends on its patented Endure manufacturing process, which ensures that our socks are strong enough to last for two years. We have always advertised our use of the Endure process, but the new study shows that despite the socks' durability, our customers, on average, actually purchase new Dura-Socks every three months. Furthermore, customers surveyed in our largest market — northeastern United States cities — say that they most value Dura-Socks' stylish appearance and availability in many colors. These findings suggest that we can increase our profits by discontinuing use of the Endure manufacturing process.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following is a letter to the editor of an environmental magazine. 'In 1975 a wildlife census found that there were seven species of amphibians in Xanadu National Park, with abundant numbers of each species. However, in 2002 only four species of amphibians were observed in the park, and the numbers of each species were drastically reduced. There has been a substantial decline in the numbers of amphibians worldwide, and global pollution of water and air is clearly implicated. The decline of amphibians in Xanadu National Park, however, almost certainly has a different cause: in 1975, trout — which are known to eat amphibian eggs — were introduced into the park.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following is a letter to the editor of an environmental magazine. 'Two studies of amphibians in Xanadu National Park confirm a significant decline in the numbers of amphibians. In 1975 there were seven species of amphibians in the park, and there were abundant numbers of each species. However, in 2002 only four species of amphibians were observed in the park, and the numbers of each species were drastically reduced. One proposed explanation is that the decline was caused by the introduction of trout into the park's waters, which began in 1975. (Trout are known to eat amphibian eggs.)' Write a response in which you discuss one or more alternative explanations that could rival the proposed explanation and explain how your explanation(s) can plausibly account for the facts presented in the argument.", EssayType.argument), Essay( "In a study of the reading habits of Waymarsh citizens conducted by the University of Waymarsh, most respondents said that they preferred literary classics as reading material. However, a second study conducted by the same researchers found that the type of book most frequently checked out of each of the public libraries in Waymarsh was the mystery novel. Therefore, it can be concluded that the respondents in the first study had misrepresented their reading habits. Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following appeared in a memo at XYZ company. 'When XYZ lays off employees, it pays Delany Personnel Firm to offer those employees assistance in creating résumés and developing interviewing skills, if they so desire. Laid-off employees have benefited greatly from Delany's services: last year those who used Delany found jobs much more quickly than did those who did not. Recently, it has been proposed that we use the less expensive Walsh Personnel Firm in place of Delany. This would be a mistake because eight years ago, when XYZ was using Walsh, only half of the workers we laid off at that time found jobs within a year. Moreover, Delany is clearly superior, as evidenced by its bigger staff and larger number of branch offices. After all, last year Delany's clients took an average of six months to find jobs, whereas Walsh's clients took nine.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "In a study of the reading habits of Waymarsh citizens conducted by the University of Waymarsh, most respondents said they preferred literary classics as reading material. However, a second study conducted by the same researchers found that the type of book most frequently checked out of each of the public libraries in Waymarsh was the mystery novel. Therefore, it can be concluded that the respondents in the first study had misrepresented their reading preferences. Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following appeared in a memorandum written by the vice president of Health Naturally, a small but expanding chain of stores selling health food and other health-related products. 'Our previous experience has been that our stores are most profitable in areas where residents are highly concerned with leading healthy lives. We should therefore build one of our new stores in Plainsville, which clearly has many such residents. Plainsville merchants report that sales of running shoes and exercise equipment are at all-time highs. The local health club, which nearly closed five years ago due to lack of business, has more members than ever, and the weight-training and aerobics classes are always full. We can even anticipate a new generation of customers: Plainsville's schoolchildren are required to participate in a program called Fitness for Life, which emphasizes the benefits of regular exercise at an early age.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following appeared in a memo at XYZ company. 'When XYZ lays off employees, it pays Delany Personnel Firm to offer those employees assistance in creating résumés and developing interviewing skills, if they so desire. Laid-off employees have benefited greatly from Delany's services: last year those who used Delany found jobs much more quickly than did those who did not. Recently, it has been proposed that we use the less expensive Walsh Personnel Firm in place of Delany. This would be a mistake because eight years ago, when XYZ was using Walsh, only half of the workers we laid off at that time found jobs within a year. Moreover, Delany is clearly superior, as evidenced by its bigger staff and larger number of branch offices. After all, last year Delany's clients took an average of six months to find jobs, whereas Walsh's clients took nine.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following appeared in a memorandum written by the vice president of Health Naturally, a small but expanding chain of stores selling health food and other health-related products. 'Our previous experience has been that our stores are most profitable in areas where residents are highly concerned with leading healthy lives. We should therefore build one of our new stores in Plainsville, which clearly has many such residents. Plainsville merchants report that sales of running shoes and exercise equipment are at all-time highs. The local health club, which nearly closed five years ago due to lack of business, has more members than ever, and the weight-training and aerobics classes are always full. We can even anticipate a new generation of customers: Plainsville's schoolchildren are required to participate in a program called Fitness for Life, which emphasizes the benefits of regular exercise at an early age.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "Three years ago, because of flooding at the Western Palean Wildlife Preserve, 100 lions and 100 western gazelles were moved to the East Palean Preserve, an area that is home to most of the same species that are found in the western preserve, though in larger numbers, and to the eastern gazelle, a close relative of the western gazelle. The only difference in climate is that the eastern preserve typically has slightly less rainfall. Unfortunately, after three years in the eastern preserve, the imported western gazelle population has been virtually eliminated. Since the slight reduction in rainfall cannot be the cause of the virtual elimination of western gazelle, their disappearance must have been caused by the larger number of predators in the eastern preserve. Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "Workers in the small town of Leeville take fewer sick days than workers in the large city of Masonton, 50 miles away. Moreover, relative to population size, the diagnosis of stress-related illness is proportionally much lower in Leeville than in Masonton. According to the Leeville Chamber of Commerce, these facts can be attributed to the health benefits of the relatively relaxed pace of life in Leeville. Write a response in which you discuss one or more alternative explanations that could rival the proposed explanation and explain how your explanation(s) can plausibly account for the facts presented in the argument.", EssayType.argument), Essay( "The following appeared in a memorandum from the manager of WWAC radio station. 'WWAC must change from its current rock-music format because the number of listeners has been declining, even though the population in our listening area has been growing. The population growth has resulted mainly from people moving to our area after their retirement, and we must make listeners of these new residents. But they seem to have limited interest in music: several local stores selling recorded music have recently closed. Therefore, just changing to another kind of music is not going to increase our audience. Instead, we should adopt a news-and-talk format, a form of radio that is increasingly popular in our area.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The vice president of human resources at Climpson Industries sent the following recommendation to the company's president. 'A recent national survey found that the majority of workers with access to the Internet at work had used company computers for personal or recreational activities, such as banking or playing games. In an effort to improve our employees' productivity, we should implement electronic monitoring of employees' Internet use from their workstations. Using electronic monitoring software is the best way to reduce the number of hours Climpson employees spend on personal or recreational activities. We predict that installing software to monitor employees' Internet use will allow us to prevent employees from wasting time, thereby increasing productivity and improving overall profits.' Write a response in which you discuss what questions would need to be answered in order to decide whether the prediction and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the prediction.", EssayType.argument), Essay( "The following appeared in a memo from the new vice president of Sartorian, a company that manufactures men's clothing. 'Five years ago, at a time when we had difficulty obtaining reliable supplies of high-quality wool fabric, we discontinued production of our popular alpaca overcoat. Now that we have a new fabric supplier, we should resume production. Given the outcry from our customers when we discontinued this product and the fact that none of our competitors offers a comparable product, we can expect pent-up consumer demand for our alpaca coats. This demand and the overall increase in clothing prices will make Sartorian's alpaca overcoats more profitable than ever before.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following appeared in a memo from the new vice president of Sartorian, a company that manufactures men's clothing. 'Five years ago, at a time when we had difficulty obtaining reliable supplies of high-quality wool fabric, we discontinued production of our popular alpaca overcoat. Now that we have a new fabric supplier, we should resume production. Given the outcry from our customers when we discontinued this product and the fact that none of our competitors offers a comparable product, we can expect pent-up consumer demand for our alpaca coats. Due to this demand and the overall increase in clothing prices, we can predict that Sartorian's alpaca overcoats will be more profitable than ever before.' Write a response in which you discuss what questions would need to be answered in order to decide whether the prediction and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the prediction.", EssayType.argument), Essay( "The following appeared in an e-mail sent by the marketing director of the Classical Shakespeare Theatre of Bardville. 'Over the past ten years, there has been a 20 percent decline in the size of the average audience at Classical Shakespeare Theatre productions. In spite of increased advertising, we are attracting fewer and fewer people to our shows, causing our profits to decrease significantly. We must take action to attract new audience members. The best way to do so is by instituting a 'Shakespeare in the Park' program this summer. Two years ago the nearby Avon Repertory Company started a 'Free Plays in the Park' program, and its profits have increased 10 percent since then. If we start a 'Shakespeare in the Park' program, we can predict that our profits will increase, too.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation is likely to have the predicted result. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following is a recommendation from the business manager of Monarch Books. 'Since its opening in Collegeville twenty years ago, Monarch Books has developed a large customer base due to its reader-friendly atmosphere and wide selection of books on all subjects. Last month, Book and Bean, a combination bookstore and coffee shop, announced its intention to open a Collegeville store. Monarch Books should open its own in-store café in the space currently devoted to children's books. Given recent national census data indicating a significant decline in the percentage of the population under age ten, sales of children's books are likely to decline. By replacing its children's books section with a café, Monarch Books can increase profits and ward off competition from Book and Bean.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following is a recommendation from the business manager of Monarch Books. 'Since its opening in Collegeville twenty years ago, Monarch Books has developed a large customer base due to its reader-friendly atmosphere and wide selection of books on all subjects. Last month, Book and Bean, a combination bookstore and coffee shop, announced its intention to open a Collegeville store. Monarch Books should open its own in-store café in the space currently devoted to children's books. Given recent national census data indicating a significant decline in the percentage of the population under age ten, sales of children's books are likely to decline. By replacing its children's books section with a café, Monarch Books can increase profits and ward off competition from Book and Bean.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following was written as a part of an application for a small-business loan by a group of developers in the city of Monroe. 'Jazz music is extremely popular in the city of Monroe: over 100,000 people attended Monroe's annual jazz festival last summer, and the highest-rated radio program in Monroe is 'Jazz Nightly,' which airs every weeknight. Also, a number of well-known jazz musicians own homes in Monroe. Nevertheless, the nearest jazz club is over an hour away. Given the popularity of jazz in Monroe and a recent nationwide study indicating that the typical jazz fan spends close to \$1,000 per year on jazz entertainment, a jazz music club in Monroe would be tremendously profitable.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "There is now evidence that the relaxed pace of life in small towns promotes better health and greater longevity than does the hectic pace of life in big cities. Businesses in the small town of Leeville report fewer days of sick leave taken by individual workers than do businesses in the nearby large city of Masonton. Furthermore, Leeville has only one physician for its one thousand residents, but in Masonton the proportion of physicians to residents is five times as high. Finally, the average age of Leeville residents is significantly higher than that of Masonton residents. These findings suggest that people seeking longer and healthier lives should consider moving to small communities. Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following was written as a part of an application for a small-business loan by a group of developers in the city of Monroe. 'Jazz music is extremely popular in the city of Monroe: over 100,000 people attended Monroe's annual jazz festival last summer, and the highest-rated radio program in Monroe is 'Jazz Nightly,' which airs every weeknight. Also, a number of well-known jazz musicians own homes in Monroe. Nevertheless, the nearest jazz club is over an hour away. Given the popularity of jazz in Monroe and a recent nationwide study indicating that the typical jazz fan spends close to \$1,000 per year on jazz entertainment, we predict that our new jazz music club in Monroe will be a tremendously profitable enterprise.' Write a response in which you discuss what questions would need to be answered in order to decide whether the prediction and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the prediction.", EssayType.argument), Essay( "There is now evidence that the relaxed pace of life in small towns promotes better health and greater longevity than does the hectic pace of life in big cities. Businesses in the small town of Leeville report fewer days of sick leave taken by individual workers than do businesses in the nearby large city of Masonton. Furthermore, Leeville has only one physician for its one thousand residents, but in Masonton the proportion of physicians to residents is five times as high. Finally, the average age of Leeville residents is significantly higher than that of Masonton residents. These findings suggest that the relaxed pace of life in Leeville allows residents to live longer, healthier lives. Write a response in which you discuss one or more alternative explanations that could rival the proposed explanation and explain how your explanation(s) can plausibly account for the facts presented in the argument.", EssayType.argument), Essay( "The following appeared in a memo from a vice president of a manufacturing company. 'During the past year, workers at our newly opened factory reported 30 percent more on-the-job accidents than workers at nearby Panoply Industries. Panoply produces products very similar to those produced at our factory, but its work shifts are one hour shorter than ours. Experts say that fatigue and sleep deprivation among workers are significant contributing factors in many on-the-job accidents. Panoply's superior safety record can therefore be attributed to its shorter work shifts, which allow its employees to get adequate amounts of rest.' Write a response in which you discuss one or more alternative explanations that could rival the proposed explanation and explain how your explanation(s) can plausibly account for the facts presented in the argument.", EssayType.argument), Essay( "The following appeared in a memo from the vice president of Butler Manufacturing. 'During the past year, workers at Butler Manufacturing reported 30 percent more on-the-job accidents than workers at nearby Panoply Industries, where the work shifts are one hour shorter than ours. A recent government study reports that fatigue and sleep deprivation among workers are significant contributing factors in many on-the-job accidents. If we shorten each of our work shifts by one hour, we can improve Butler Manufacturing's safety record by ensuring that our employees are adequately rested.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following appeared in a memo from the Board of Directors of Butler Manufacturing. 'During the past year, workers at Butler Manufacturing reported 30 percent more on-the-job accidents than workers at nearby Panoply Industries, where the work shifts are one hour shorter than ours. A recent government study reports that fatigue and sleep deprivation among workers are significant contributing factors in many on-the-job accidents. Therefore, we recommend that Butler Manufacturing shorten each of its work shifts by one hour. Shorter shifts will allow Butler to improve its safety record by ensuring that its employees are adequately rested.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation is likely to have the predicted result. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared in a memo from the business manager of a chain of cheese stores located throughout the United States. 'For many years all the stores in our chain have stocked a wide variety of both domestic and imported cheeses. Last year, however, all of the five best-selling cheeses at our newest store were domestic cheddar cheeses from Wisconsin. Furthermore, a recent survey by Cheeses of the World magazine indicates an increasing preference for domestic cheeses among its subscribers. Since our company can reduce expenses by limiting inventory, the best way to improve profits in all of our stores is to discontinue stocking many of our varieties of imported cheese and concentrate primarily on domestic cheeses.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following appeared in a memo from the owner of a chain of cheese stores located throughout the United States. 'For many years all the stores in our chain have stocked a wide variety of both domestic and imported cheeses. Last year, however, all of the five best-selling cheeses at our newest store were domestic cheddar cheeses from Wisconsin. Furthermore, a recent survey by Cheeses of the World magazine indicates an increasing preference for domestic cheeses among its subscribers. Since our company can reduce expenses by limiting inventory, the best way to improve profits in all of our stores is to discontinue stocking many of our varieties of imported cheese and concentrate primarily on domestic cheeses.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following appeared in a memorandum from the general manager of KNOW radio station. 'Several factors indicate that radio station KNOW should shift its programming from rock-and-roll music to a continuous news format. Consider, for example, that the number of people in our listening area over fifty years of age has increased dramatically, while our total number of listeners has declined. Also, music stores in our area report decreased sales of recorded music. Finally, continuous news stations in neighboring cities have been very successful. The switch from rock-and-roll music to 24-hour news will attract older listeners and secure KNOW radio's future.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following appeared in a memorandum from the manager of KNOW radio station. 'Several factors indicate that KNOW radio can no longer succeed as a rock-and-roll music station. Consider, for example, that the number of people in our listening area over fifty years of age has increased dramatically, while our total number of listeners has declined. Also, music stores in our area report decreased sales of rock-and-roll music. Finally, continuous news stations in neighboring cities have been very successful. We predict that switching KNOW radio from rock-and-roll music to 24-hour news will allow the station to attract older listeners and make KNOW radio more profitable than ever.' Write a response in which you discuss what questions would need to be answered in order to decide whether the prediction and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the prediction.", EssayType.argument), Essay( "The following appeared in a memorandum from the owner of Movies Galore, a chain of movie-rental stores. 'In order to stop the recent decline in our profits, we must reduce operating expenses at Movies Galore's ten movie-rental stores. Since we are famous for our special bargains, raising our rental prices is not a viable way to improve profits. Last month our store in downtown Marston significantly decreased its operating expenses by closing at 6:00 P.M. rather than 9:00 P.M. and by reducing its stock by eliminating all movies released more than five years ago. By implementing similar changes in our other stores, Movies Galore can increase profits without jeopardizing our reputation for offering great movies at low prices.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following appeared in a memorandum from the owner of Movies Galore, a chain of movie-rental stores. 'In order to reverse the recent decline in our profits, we must reduce operating expenses at Movies Galore's ten movie-rental stores. Since we are famous for our special bargains, raising our rental prices is not a viable way to improve profits. Last month our store in downtown Marston significantly decreased its operating expenses by closing at 6:00 p.m. rather than 9:00 p.m. and by reducing its stock by eliminating all movies released more than five years ago. Therefore, in order to increase profits without jeopardizing our reputation for offering great movies at low prices, we recommend implementing similar changes in our other nine Movies Galore stores.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following is a recommendation from the personnel director to the president of Acme Publishing Company. 'Many other companies have recently stated that having their employees take the Easy Read Speed-Reading Course has greatly improved productivity. One graduate of the course was able to read a 500-page report in only two hours; another graduate rose from an assistant manager to vice president of the company in under a year. Obviously, the faster you can read, the more information you can absorb in a single workday. Moreover, Easy Read would cost Acme only \$500 per employee — a small price to pay when you consider the benefits. Included in this fee is a three-week seminar in Spruce City and a lifelong subscription to the Easy Read newsletter. Clearly, to improve productivity, Acme should require all of our employees to take the Easy Read course.' Write a response in which you discuss what questions would need to be answered in order to decide whether the advice and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the advice.", EssayType.argument), Essay( "The following appeared in a memo from the vice president of a food distribution company with food storage warehouses in several cities. 'Recently, we signed a contract with the Fly-Away Pest Control Company to provide pest control services at our warehouse in Palm City, but last month we discovered that over \$20,000 worth of food there had been destroyed by pest damage. Meanwhile, the Buzzoff Pest Control Company, which we have used for many years in Palm City, continued to service our warehouse in Wintervale, and last month only \$10,000 worth of the food stored there had been destroyed by pest damage. Even though the price charged by Fly-Away is considerably lower, our best means of saving money is to return to Buzzoff for all our pest control services.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared in a memo from a vice president of a large, highly diversified company. 'Ten years ago our company had two new office buildings constructed as regional headquarters for two different regions. The buildings were erected by two different construction companies — Alpha and Zeta. Even though the two buildings had identical floor plans, the building constructed by Zeta cost 30 percent more to build, and its expenses for maintenance last year were twice those of the building constructed by Alpha. Furthermore, the energy consumption of the Zeta building has been higher than that of the Alpha building every year since its construction. Such data, plus the fact that Alpha has a stable workforce with little employee turnover, indicate that we should use Alpha rather than Zeta for our contemplated new building project.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following appeared in a memo from the vice president of a food distribution company with food storage warehouses in several cities. 'Recently, we signed a contract with the Fly-Away Pest Control Company to provide pest control services at our warehouse in Palm City, but last month we discovered that over \$20,000 worth of food there had been destroyed by pest damage. Meanwhile, the Buzzoff Pest Control Company, which we have used for many years in Palm City, continued to service our warehouse in Wintervale, and last month only \$10,000 worth of the food stored there had been destroyed by pest damage. This difference in pest damage is best explained by the negligence of Fly-Away.' Write a response in which you discuss one or more alternative explanations that could rival the proposed explanation and explain how your explanation(s) can plausibly account for the facts presented in the argument.", EssayType.argument), Essay( "The following appeared in a memo from the vice president of a food distribution company with food storage warehouses in several cities. 'Recently, we signed a contract with the Fly-Away Pest Control Company to provide pest control services at our warehouse in Palm City, but last month we discovered that over \$20,000 worth of food there had been destroyed by pest damage. Meanwhile, the Buzzoff Pest Control Company, which we have used for many years in Palm City, continued to service our warehouse in Wintervale, and last month only \$10,000 worth of the food stored there had been destroyed by pest damage. Even though the price charged by Fly-Away is considerably lower, our best means of saving money is to return to Buzzoff for all our pest control services.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following appeared as part of an article in a business magazine. 'A recent study rating 300 male and female advertising executives according to the average number of hours they sleep per night showed an association between the amount of sleep the executives need and the success of their firms. Of the advertising firms studied, those whose executives reported needing no more than six hours of sleep per night had higher profit margins and faster growth. On the basis of this study, we recommend that businesses hire only people who need less than six hours of sleep per night.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "Evidence suggests that academic honor codes, which call for students to agree not to cheat in their academic endeavors and to notify a faculty member if they suspect that others have cheated, are far more successful than are other methods at deterring cheating among students at colleges and universities. Several years ago, Groveton College adopted such a code and discontinued its old-fashioned system in which teachers closely monitored students. Under the old system, teachers reported an average of thirty cases of cheating per year. In the first year the honor code was in place, students reported twenty-one cases of cheating; five years later, this figure had dropped to fourteen. Moreover, in a recent survey, a majority of Groveton students said that they would be less likely to cheat with an honor code in place than without. Write a response in which you discuss one or more alternative explanations that could rival the proposed explanation and explain how your explanation(s) can plausibly account for the facts presented in the argument.", EssayType.argument), Essay( "Several years ago, Groveton College adopted an honor code, which calls for students to agree not to cheat in their academic endeavors and to notify a faculty member if they suspect that others have cheated. Groveton's honor code replaced a system in which teachers closely monitored students. Under that system, teachers reported an average of thirty cases of cheating per year. The honor code has proven far more successful: in the first year it was in place, students reported twenty-one cases of cheating; five years later, this figure had dropped to fourteen. Moreover, in a recent survey, a majority of Groveton students said that they would be less likely to cheat with an honor code in place than without. Such evidence suggests that all colleges and universities should adopt honor codes similar to Groveton's. This change is sure to result in a dramatic decline in cheating among college students. Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation is likely to have the predicted result. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared in a memo from the director of a large group of hospitals. 'In a controlled laboratory study of liquid hand soaps, a concentrated solution of extra strength UltraClean hand soap produced a 40 percent greater reduction in harmful bacteria than did the liquid hand soaps currently used in our hospitals. During our recent test of regular-strength UltraClean with doctors, nurses, and visitors at our hospital in Worktown, the hospital reported significantly fewer cases of patient infection (a 20 percent reduction) than did any of the other hospitals in our group. Therefore, to prevent serious patient infections, we should supply UltraClean at all hand-washing stations, including those used by visitors, throughout our hospital system.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following appeared in a memo from the director of a large group of hospitals. 'In a controlled laboratory study of liquid hand soaps, a concentrated solution of extra strength UltraClean hand soap produced a 40 percent greater reduction in harmful bacteria than did the liquid hand soaps currently used in our hospitals. During our recent test of regular-strength UltraClean with doctors, nurses, and visitors at our hospital in Worktown, the hospital reported significantly fewer cases of patient infection (a 20 percent reduction) than did any of the other hospitals in our group. The explanation for the 20 percent reduction in patient infections is the use of UltraClean soap.' Write a response in which you discuss one or more alternative explanations that could rival the proposed explanation and explain how your explanation(s) can plausibly account for the facts presented in the argument.", EssayType.argument), Essay( "The following appeared in a health newsletter. 'A ten-year nationwide study of the effectiveness of wearing a helmet while bicycling indicates that ten years ago, approximately 35 percent of all bicyclists reported wearing helmets, whereas today that number is nearly 80 percent. Another study, however, suggests that during the same ten-year period, the number of accidents caused by bicycling has increased 200 percent. These results demonstrate that bicyclists feel safer because they are wearing helmets, and they take more risks as a result. Thus, there is clearly a call for the government to strive to reduce the number of serious injuries from bicycle accidents by launching an education program that concentrates on the factors other than helmet use that are necessary for bicycle safety.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared in a memo from the director of a large group of hospitals. 'In a controlled laboratory study of liquid hand soaps, a concentrated solution of extra strength UltraClean hand soap produced a 40 percent greater reduction in harmful bacteria than did the liquid hand soaps currently used in our hospitals. During our recent test of regular-strength UltraClean with doctors, nurses, and visitors at our hospital in Worktown, the hospital reported significantly fewer cases of patient infection (a 20 percent reduction) than did any of the other hospitals in our group. Therefore, to prevent serious patient infections, we should supply UltraClean at all hand-washing stations, including those used by visitors, throughout our hospital system.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following appeared in a health newsletter. 'A ten-year nationwide study of the effectiveness of wearing a helmet while bicycling indicates that ten years ago, approximately 35 percent of all bicyclists reported wearing helmets, whereas today that number is nearly 80 percent. Another study, however, suggests that during the same ten-year period, the number of accidents caused by bicycling has increased 200 percent. These results demonstrate that bicyclists feel safer because they are wearing helmets, and they take more risks as a result. Thus there is clearly a call for the government to strive to reduce the number of serious injuries from bicycle accidents by launching an education program that concentrates on the factors other than helmet use that are necessary for bicycle safety.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following is a recommendation from the personnel director to the president of Acme Publishing Company. 'Many other companies have recently stated that having their employees take the Easy Read Speed-Reading Course has greatly improved productivity. One graduate of the course was able to read a 500-page report in only two hours; another graduate rose from an assistant manager to vice president of the company in under a year. Obviously, the faster you can read, the more information you can absorb in a single workday. Moreover, Easy Read would cost Acme only \$500 per employee — a small price to pay when you consider the benefits. Included in this fee is a three-week seminar in Spruce City and a lifelong subscription to the Easy Read newsletter. Clearly, Acme would benefit greatly by requiring all of our employees to take the Easy Read course.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following is a recommendation from the personnel director to the president of Acme Publishing Company. 'Many other companies have recently stated that having their employees take the Easy Read Speed-Reading Course has greatly improved productivity. One graduate of the course was able to read a 500-page report in only two hours; another graduate rose from an assistant manager to vice president of the company in under a year. Obviously, the faster you can read, the more information you can absorb in a single workday. Moreover, Easy Read would cost Acme only \$500 per employee — a small price to pay when you consider the benefits. Included in this fee is a three-week seminar in Spruce City and a lifelong subscription to the Easy Read newsletter. Clearly, to improve overall productivity, Acme should require all of our employees to take the Easy Read course.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared in a letter from the owner of the Sunnyside Towers apartment complex to its manager. 'One month ago, all the showerheads in the first three buildings of the Sunnyside Towers complex were modified to restrict maximum water flow to one-third of what it used to be. Although actual readings of water usage before and after the adjustment are not yet available, the change will obviously result in a considerable savings for Sunnyside Corporation, since the corporation must pay for water each month. Except for a few complaints about low water pressure, no problems with showers have been reported since the adjustment. Clearly, modifying showerheads to restrict water flow throughout all twelve buildings in the Sunnyside Towers complex will increase our profits further.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following appeared in a letter from the owner of the Sunnyside Towers apartment complex to its manager. 'Last week, all the showerheads in the first three buildings of the Sunnyside Towers complex were modified to restrict maximum water flow to one-third of what it used to be. Although actual readings of water usage before and after the adjustment are not yet available, the change will obviously result in a considerable savings for Sunnyside Corporation, since the corporation must pay for water each month. Except for a few complaints about low water pressure, no problems with showers have been reported since the adjustment. Clearly, modifying showerheads to restrict water flow throughout all twelve buildings in the Sunnyside Towers complex will increase our profits further.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following memorandum is from the business manager of Happy Pancake House restaurants. 'Butter has now been replaced by margarine in Happy Pancake House restaurants throughout the southwestern United States. Only about 2 percent of customers have filed a formal complaint, indicating that an average of 98 people out of 100 are happy with the change. Furthermore, many servers have reported that a number of customers who ask for butter do not complain when they are given margarine instead. Clearly, either these customers cannot distinguish butter from margarine or they use the term 'butter' to refer to either butter or margarine. Thus, to avoid the expense of purchasing butter, the Happy Pancake House should extend this cost-saving change to its restaurants throughout the rest of the country.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following memorandum is from the business manager of Happy Pancake House restaurants. 'Butter has now been replaced by margarine in Happy Pancake House restaurants throughout the southwestern United States. Only about 2 percent of customers have complained, indicating that an average of 98 people out of 100 are happy with the change. Furthermore, many servers have reported that a number of customers who ask for butter do not complain when they are given margarine instead. Clearly, either these customers cannot distinguish butter from margarine or they use the term 'butter' to refer to either butter or margarine. Thus, we predict that Happy Pancake House will be able to increase profits dramatically if we extend this cost-saving change to all our restaurants in the southeast and northeast as well.' Write a response in which you discuss what questions would need to be answered in order to decide whether the prediction and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the prediction.", EssayType.argument), Essay( "The following appeared in a letter to the school board in the town of Centerville. 'All students should be required to take the driver's education course at Centerville High School. In the past two years, several accidents in and around Centerville have involved teenage drivers. Since a number of parents in Centerville have complained that they are too busy to teach their teenagers to drive, some other instruction is necessary to ensure that these teenagers are safe drivers. Although there are two driving schools in Centerville, parents on a tight budget cannot afford to pay for driving instruction. Therefore an effective and mandatory program sponsored by the high school is the only solution to this serious problem.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following memorandum is from the business manager of Happy Pancake House restaurants. 'Butter has now been replaced by margarine in Happy Pancake House restaurants throughout the southwestern United States. Only about 2 percent of customers have complained, indicating that an average of 98 people out of 100 are happy with the change. Furthermore, many servers have reported that a number of customers who ask for butter do not complain when they are given margarine instead. Clearly, either these customers cannot distinguish butter from margarine or they use the term 'butter' to refer to either butter or margarine. Thus, to avoid the expense of purchasing butter and to increase profitability, the Happy Pancake House should extend this cost-saving change to its restaurants in the southeast and northeast as well.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following appeared in a letter to the school board in the town of Centerville. 'All students should be required to take the driver's education course at Centerville High School. In the past two years, several accidents in and around Centerville have involved teenage drivers. Since a number of parents in Centerville have complained that they are too busy to teach their teenagers to drive, some other instruction is necessary to ensure that these teenagers are safe drivers. Although there are two driving schools in Centerville, parents on a tight budget cannot afford to pay for driving instruction. Therefore an effective and mandatory program sponsored by the high school is the only solution to this serious problem.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The data from a survey of high school math and science teachers show that in the district of Sanlee many of these teachers reported assigning daily homework, whereas in the district of Marlee, most science and math teachers reported assigning homework no more than two or three days per week. Despite receiving less frequent homework assignments, Marlee students earn better grades overall and are less likely to be required to repeat a year of school than are students in Sanlee. These results call into question the usefulness of frequent homework assignments. Most likely the Marlee students have more time to concentrate on individual assignments than do the Sanlee students who have homework every day. Therefore teachers in our high schools should assign homework no more than twice a week. Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following appeared in a letter to the school board in the town of Centerville. 'All students should be required to take the driver's education course at Centerville High School. In the past two years, several accidents in and around Centerville have involved teenage drivers. Since a number of parents in Centerville have complained that they are too busy to teach their teenagers to drive, some other instruction is necessary to ensure that these teenagers are safe drivers. Although there are two driving schools in Centerville, parents on a tight budget cannot afford to pay for driving instruction. Therefore an effective and mandatory program sponsored by the high school is the only solution to this serious problem.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "While the Department of Education in the state of Attra recommends that high school students be assigned homework every day, the data from a recent statewide survey of high school math and science teachers give us reason to question the usefulness of daily homework. In the district of Sanlee, 86 percent of the teachers reported assigning homework three to five times a week, whereas in the district of Marlee, less than 25 percent of the teachers reported assigning homework three to five times a week. Yet the students in Marlee earn better grades overall and are less likely to be required to repeat a year of school than are the students in Sanlee. Therefore, all teachers in our high schools should assign homework no more than twice a week. Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following appeared as an editorial in the student newspaper of Groveton College. 'To combat the recently reported dramatic rise in cheating among college students, colleges and universities should adopt honor codes similar to Groveton's, which calls for students to agree not to cheat in their academic endeavors and to notify a faculty member if they suspect that others have cheated. Groveton's honor code replaced an old-fashioned system in which teachers closely monitored students. Under that system, teachers reported an average of thirty cases of cheating per year. The honor code has proven far more successful: in the first year it was in place, students reported twenty-one cases of cheating; five years later, this figure had dropped to fourteen. Moreover, in a recent survey conducted by the Groveton honor council, a majority of students said that they would be less likely to cheat with an honor code in place than without.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following appeared in a memo from a budget planner for the city of Grandview. 'Our citizens are well aware of the fact that while the Grandview Symphony Orchestra was struggling to succeed, our city government promised annual funding to help support its programs. Last year, however, private contributions to the symphony increased by 200 percent, and attendance at the symphony's concerts-in-the-park series doubled. The symphony has also announced an increase in ticket prices for next year. Such developments indicate that the symphony can now succeed without funding from city government and we can eliminate that expense from next year's budget. Therefore, we recommend that the city of Grandview eliminate its funding for the Grandview Symphony from next year's budget. By doing so, we can prevent a city budget deficit without threatening the success of the symphony.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation is likely to have the predicted result. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "While the Department of Education in the state of Attra suggests that high school students be assigned homework every day, the data from a recent statewide survey of high school math and science teachers give us reason to question the usefulness of daily homework. In the district of Sanlee, 86 percent of the teachers reported assigning homework three to five times a week, whereas in the district of Marlee, less than 25 percent of the teachers reported assigning homework three to five times a week. Yet the students in Marlee earn better grades overall and are less likely to be required to repeat a year of school than are the students in Sanlee. Therefore, we recommend that all teachers in our high schools should assign homework no more than twice a week. Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared in a memo to the board of the Grandview Symphony. 'The city of Grandview has provided annual funding for the Grandview Symphony since the symphony's inception ten years ago. Last year the symphony hired an internationally known conductor, who has been able to attract high-profile guest musicians to perform with the symphony. Since then, private contributions to the symphony have doubled and attendance at the symphony's concerts-in-the-park series has reached new highs. Now that the Grandview Symphony is an established success, it can raise ticket prices. Increased revenue from larger audiences and higher ticket prices will enable the symphony to succeed without funding from the city government.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "Hospital statistics regarding people who go to the emergency room after roller-skating accidents indicate the need for more protective equipment. Within that group of people, 75 percent of those who had accidents in streets or parking lots had not been wearing any protective clothing (helmets, knee pads, etc.) or any light-reflecting material (clip-on lights, glow-in-the-dark wrist pads, etc.). Clearly, the statistics indicate that by investing in high-quality protective gear and reflective equipment, roller skaters will greatly reduce their risk of being severely injured in an accident. Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following appeared in a memo from a budget planner for the city of Grandview. 'When the Grandview Symphony was established ten years ago, the city of Grandview agreed to provide the symphony with annual funding until the symphony became self-sustaining. Two years ago, the symphony hired an internationally known conductor, who has been able to attract high-profile guest musicians to perform with the symphony. Since then, private contributions to the symphony have tripled and attendance at the symphony's outdoor summer concert series has reached record highs. Now that the symphony has succeeded in finding an audience, the city can eliminate its funding of the symphony.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The citizens of Forsythe have adopted more healthful lifestyles. Their responses to a recent survey show that in their eating habits they conform more closely to government nutritional recommendations than they did ten years ago. Furthermore, there has been a fourfold increase in sales of food products containing kiran, a substance that a scientific study has shown reduces cholesterol. This trend is also evident in reduced sales of sulia, a food that few of the healthiest citizens regularly eat. Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following appeared in a memo to the board of directors of a company that specializes in the delivery of heating oil. 'Most homes in the northeastern United States, where winters are typically cold, have traditionally used oil as their major fuel for heating. Last heating season, that region experienced 90 days with below-normal temperatures, and climate forecasters predict that this weather pattern will continue for several more years. Furthermore, many new homes are being built in the region in response to recent population growth. Because of these trends, we can safely predict that this region will experience an increased demand for heating oil during the next five years.' Write a response in which you discuss what questions would need to be answered in order to decide whether the prediction and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the prediction.", EssayType.argument), Essay( "The following appeared in a memo to the board of directors of a company that specializes in the delivery of heating oil. 'Most homes in the northeastern United States, where winters are typically cold, have traditionally used oil as their major fuel for heating. Last heating season, that region experienced 90 days with below-normal temperatures, and climate forecasters predict that this weather pattern will continue for several more years. Furthermore, many new homes are being built in the region in response to recent population growth. Because of these trends, we can safely predict that this region will experience an increased demand for heating oil during the next five years.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following recommendation was made by the president and administrative staff of Grove College, a private institution, to the college's governing committee. 'We recommend that Grove College preserve its century-old tradition of all-female education rather than admit men into its programs. It is true that a majority of faculty members voted in favor of coeducation, arguing that it would encourage more students to apply to Grove. But 80 percent of the students responding to a survey conducted by the student government wanted the school to remain all female, and over half of the alumnae who answered a separate survey also opposed coeducation. Keeping the college all female will improve morale among students and convince alumnae to keep supporting the college financially.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following recommendation was made by the president and administrative staff of Grove College, a private institution, to the college's governing committee. 'We recommend that Grove College preserve its century-old tradition of all-female education rather than admit men into its programs. It is true that a majority of faculty members voted in favor of coeducation, arguing that it would encourage more students to apply to Grove. But 80 percent of the students responding to a survey conducted by the student government wanted the school to remain all female, and over half of the alumnae who answered a separate survey also opposed coeducation. Keeping the college all female will improve morale among students and convince alumnae to keep supporting the college financially.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation is likely to have the predicted result. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared in a letter from a firm providing investment advice to a client. 'Homes in the northeastern United States, where winters are typically cold, have traditionally used oil as their major fuel for heating. Last year that region experienced 90 days with below-average temperatures, and climate forecasters at Waymarsh University predict that this weather pattern will continue for several more years. Furthermore, many new homes have been built in this region during the past year. Because these developments will certainly result in an increased demand for heating oil, we recommend investment in Consolidated Industries, one of whose major business operations is the retail sale of home heating oil.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "Benton City residents have adopted healthier lifestyles. A recent survey of city residents shows that the eating habits of city residents conform more closely to government nutritional recommendations than they did ten years ago. During those ten years, local sales of food products containing kiran, a substance that a scientific study has shown reduces cholesterol, have increased fourfold, while sales of sulia, a food rarely eaten by the healthiest residents, have declined dramatically. Because of these positive changes in the eating habits of Benton City residents, we predict that the obesity rate in the city will soon be well below the national average. Write a response in which you discuss what questions would need to be answered in order to decide whether the prediction and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the prediction.", EssayType.argument), Essay( "The following appeared in a memo to the board of directors of Bargain Brand Cereals. 'One year ago we introduced our first product, Bargain Brand breakfast cereal. Our very low prices quickly drew many customers away from the top-selling cereal companies. Although the companies producing the top brands have since tried to compete with us by lowering their prices and although several plan to introduce their own budget brands, not once have we needed to raise our prices to continue making a profit. Given our success in selling cereal, we recommend that Bargain Brand now expand its business and begin marketing other low-priced food products as quickly as possible.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared in a memo to the board of directors of Bargain Brand Cereals. 'One year ago we introduced our first product, Bargain Brand breakfast cereal. Our very low prices quickly drew many customers away from the top-selling cereal companies. Although the companies producing the top brands have since tried to compete with us by lowering their prices and although several plan to introduce their own budget brands, not once have we needed to raise our prices to continue making a profit. Given our success in selling cereal, we recommend that Bargain Brand now expand its business and begin marketing other low-priced food products as quickly as possible.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following appeared in a letter from a firm providing investment advice to a client. 'Homes in the northeastern United States, where winters are typically cold, have traditionally used oil as their major fuel for heating. Last year that region experienced twenty days with below-average temperatures, and local weather forecasters throughout the region predict that this weather pattern will continue for several more years. Furthermore, many new homes have been built in this region during the past year. Based on these developments, we predict a large increase in the demand for heating oil. Therefore, we recommend investment in Consolidated Industries, one of whose major business operations is the retail sale of home heating oil.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared in a letter from a firm providing investment advice to a client. 'Homes in the northeastern United States, where winters are typically cold, have traditionally used oil as their major fuel for heating. Last year that region experienced twenty days with below-average temperatures, and local weather forecasters throughout the region predict that this weather pattern will continue for several more years. Furthermore, many new homes have been built in this region during the past year. Because of these developments, we predict an increased demand for heating oil and recommend investment in Consolidated Industries, one of whose major business operations is the retail sale of home heating oil.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following recommendation was made by the president and administrative staff of Grove College, a private institution, to the college's governing committee. 'Recently, there have been discussions about ending Grove College's century-old tradition of all-female education by admitting male students into our programs. At a recent faculty meeting, a majority of faculty members voted in favor of coeducation, arguing that it would encourage more students to apply to Grove. However, Grove students, both past and present, are against the idea of coeducation. Eighty percent of the students responding to a survey conducted by the student government wanted the school to remain all female, and over half of the alumnae who answered a separate survey also opposed coeducation. Therefore, we recommend maintaining Grove College's tradition of all-female education. We predict that keeping the college all-female will improve morale among students and convince alumnae to keep supporting the college financially.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation is likely to have the predicted result. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared in a memo from the marketing director of Top Dog Pet Stores. 'Five years ago Fish Emporium started advertising in the magazine Exotic Pets Monthly. Their stores saw sales increase by 15 percent after their ads began appearing in the magazine. The three Fish Emporium stores in Gulf City saw an even greater increase than that. Because Top Dog Pet Stores is based in Gulf City, it seems clear that we should start placing our own ads in Exotic Pets Monthly. If we do so, we will be sure to reverse the recent trend of declining sales and start making a profit again.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following appeared in a memo from the marketing director of Top Dog Pet Stores. 'Five years ago, Fish Emporium started advertising in the magazine Exotic Pets Monthly. Their stores saw sales increase by 15 percent. The three Fish Emporium stores in Gulf City saw an even greater increase than that. Because Top Dog has some of its largest stores in Gulf City, it seems clear that we should start placing our own ads in Exotic Pets Monthly. If we do so, we will be sure to reverse the recent trend of declining sales and start making a profit again.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following appeared in a letter to the editor of the Balmer Island Gazette. 'The population on Balmer Island increases to 100,000 during the summer months. To reduce the number of accidents involving mopeds and pedestrians, the town council of Balmer Island plans to limit the number of mopeds rented by each of the island's six moped rental companies from 50 per day to 30 per day during the summer season. Last year, the neighboring island of Torseau enforced similar limits on moped rentals and saw a 50 percent reduction in moped accidents. We predict that putting these limits into effect on Balmer Island will result in the same reduction in moped accidents.' Write a response in which you discuss what questions would need to be answered in order to decide whether the prediction and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the prediction.", EssayType.argument), Essay( "The following appeared in a recommendation from the President of the Amburg Chamber of Commerce. 'Last October, the city of Belleville installed high-intensity lighting in its central business district, and vandalism there declined almost immediately. The city of Amburg, on the other hand, recently instituted police patrols on bicycles in its business district. However, the rate of vandalism here remains constant. Since high-intensity lighting is clearly the most effective way to combat crime, we recommend using the money that is currently being spent on bicycle patrols to install such lighting throughout Amburg. If we install this high-intensity lighting, we will significantly reduce crime rates in Amburg.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation is likely to have the predicted result. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following is a recommendation from the personnel director to the president of Acme Publishing Company. 'Many other companies have recently stated that having their employees take the Easy Read Speed-Reading Course has greatly improved productivity. One graduate of the course was able to read a 500-page report in only two hours; another graduate rose from an assistant manager to vice president of the company in under a year. Obviously, the faster you can read, the more information you can absorb in a single workday. Moreover, Easy Read would cost Acme only \$500 per employee — a small price to pay when you consider the benefits. Included in this fee is a three-week seminar in Spruce City and a lifelong subscription to the Easy Read newsletter. Clearly, Acme would benefit greatly by requiring all of our employees to take the Easy Read course.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "The following appeared in a memo from a budget planner for the city of Grandview. 'It is time for the city of Grandview to stop funding the Grandview Symphony Orchestra. It is true that the symphony struggled financially for many years, but last year private contributions to the symphony increased by 200 percent and attendance at the symphony's concerts-in-the-park series doubled. In addition, the symphony has just announced an increase in ticket prices for next year. For these reasons, we recommend that the city eliminate funding for the Grandview Symphony Orchestra from next year's budget. We predict that the symphony will flourish in the years to come even without funding from the city.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation is likely to have the predicted result. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following memo appeared in the newsletter of the West Meria Public Health Council. 'An innovative treatment has come to our attention that promises to significantly reduce absenteeism in our schools and workplaces. A study reports that in nearby East Meria, where consumption of the plant beneficia is very high, people visit the doctor only once or twice per year for the treatment of colds. Clearly, eating a substantial amount of beneficia can prevent colds. Since colds are the reason most frequently given for absences from school and work, we recommend the daily use of nutritional supplements derived from beneficia. We predict this will dramatically reduce absenteeism in our schools and workplaces.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation is likely to have the predicted result. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following was written by a group of developers in the city of Monroe. 'A jazz music club in Monroe would be a tremendously profitable enterprise. At present, the nearest jazz club is over 60 miles away from Monroe; thus, our proposed club, the C Note, would have the local market all to itself. In addition, there is ample evidence of the popularity of jazz in Monroe: over 100,000 people attended Monroe's jazz festival last summer, several well-known jazz musicians live in Monroe, and the highest-rated radio program in Monroe is 'Jazz Nightly.' Finally, a nationwide study indicates that the typical jazz fan spends close to \$1,000 per year on jazz entertainment. We therefore predict that the C Note cannot help but make money.' Write a response in which you discuss what questions would need to be answered in order to decide whether the prediction and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the prediction.", EssayType.argument), Essay( "Humans arrived in the Kaliko Islands about 7,000 years ago, and within 3,000 years most of the large mammal species that had lived in the forests of the Kaliko Islands were extinct. Previous archaeological findings have suggested that early humans generally relied on both fishing and hunting for food; since archaeologists have discovered numerous sites in the Kaliko Islands where the bones of fish were discarded, it is likely that the humans also hunted the mammals. Furthermore, researchers have uncovered simple tools, such as stone knives, that could be used for hunting. The only clear explanation is that humans caused the extinction of the various mammal species through excessive hunting. Write a response in which you discuss one or more alternative explanations that could rival the proposed explanation and explain how your explanation(s) can plausibly account for the facts presented in the argument.", EssayType.argument), Essay( "The following memo appeared in the newsletter of the West Meria Public Health Council. 'An innovative treatment has come to our attention that promises to significantly reduce absenteeism in our schools and workplaces. A study reports that in nearby East Meria, where fish consumption is very high, people visit the doctor only once or twice per year for the treatment of colds. This shows that eating a substantial amount of fish can clearly prevent colds. Furthermore, since colds are the reason most frequently given for absences from school and work, attendance levels will improve. Therefore, we recommend the daily use of a nutritional supplement derived from fish oil as a good way to prevent colds and lower absenteeism.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared in a memo from a vice president of Alta Manufacturing. 'During the past year, Alta Manufacturing had thirty percent more on-the-job accidents than nearby Panoply Industries, where the work shifts are one hour shorter than ours. Experts believe that a significant contributing factor in many accidents is fatigue caused by sleep deprivation among workers. Therefore, to reduce the number of on-the-job accidents at Alta, we recommend shortening each of our three work shifts by one hour. If we do this, our employees will get adequate amounts of sleep.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following is a letter that recently appeared in the Oak City Gazette, a local newspaper. 'The primary function of the Committee for a Better Oak City is to advise the city government on how to make the best use of the city's limited budget. However, at some of our recent meetings we failed to make important decisions because of the foolish objections raised by committee members who are not even residents of Oak City. People who work in Oak City but who live elsewhere cannot fully understand the business and politics of the city. After all, only Oak City residents pay city taxes, and therefore only residents understand how that money could best be used to improve the city. We recommend, then, that the Committee for a Better Oak City vote to restrict its membership to city residents only. We predict that, without the interference of non-residents, the committee will be able to make Oak City a better place in which to live and work.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation is likely to have the predicted result. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared in a memo from the mayor of Brindleburg to the city council. 'Two years ago, the town of Seaside Vista opened a new municipal golf course and resort hotel. Since then, the Seaside Vista Tourism Board has reported a 20% increase in visitors. In addition, local banks reported a steep rise in the number of new business loan applications they received this year. The amount of tax money collected by Seaside Vista has also increased, allowing the town to announce plans to improve Seaside Vista's roads and bridges. We recommend building a similar golf course and resort hotel in Brindleburg. We predict that this project will generate additional tax revenue that the city can use to fund much-needed public improvements.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation is likely to have the predicted result. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared in a memo from the vice president of a company that builds shopping malls around the country. 'The surface of a section of Route 101, paved just two years ago by Good Intentions Roadways, is now badly cracked with a number of dangerous potholes. In another part of the state, a section of Route 40, paved by Appian Roadways more than four years ago, is still in good condition. In a demonstration of their continuing commitment to quality, Appian Roadways recently purchased state-of-the-art paving machinery and hired a new quality-control manager. Therefore, I recommend hiring Appian Roadways to construct the access roads for all our new shopping malls. I predict that our Appian access roads will not have to be repaired for at least four years.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation is likely to have the predicted result. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared in a recommendation from the president of Amburg's Chamber of Commerce. 'Last October the city of Belleville installed high-intensity lighting in its central business district, and vandalism there declined within a month. The city of Amburg has recently begun police patrols on bicycles in its business district, but the rate of vandalism there remains constant. We should install high-intensity lighting throughout Amburg, then, because doing so is a more effective way to combat crime. By reducing crime in this way, we can revitalize the declining neighborhoods in our city.' Write a response in which you discuss what specific evidence is needed to evaluate the argument and explain how the evidence would weaken or strengthen the argument.", EssayType.argument), Essay( "The following appeared in a letter to the editor of the Balmer Island Gazette. 'The population on Balmer Island doubles during the summer months. During the summer, then, the town council of Balmer Island should decrease the maximum number of moped rentals allowed at each of the island's six moped and bicycle rental companies from 50 per day to 30 per day. This will significantly reduce the number of summertime accidents involving mopeds and pedestrians. The neighboring island of Torseau actually saw a 50 percent reduction in moped accidents last year when Torseau's town council enforced similar limits on moped rentals. To help reduce moped accidents, therefore, we should also enforce these limitations during the summer months.' Write a response in which you examine the stated and/or unstated assumptions of the argument. Be sure to explain how the argument depends on these assumptions and what the implications are for the argument if the assumptions prove unwarranted.", EssayType.argument), Essay( "A recent sales study indicates that consumption of seafood dishes in Bay City restaurants has increased by 30 percent during the past five years. Yet there are no currently operating city restaurants whose specialty is seafood. Moreover, the majority of families in Bay City are two-income families, and a nationwide study has shown that such families eat significantly fewer home-cooked meals than they did a decade ago but at the same time express more concern about healthful eating. Therefore, the new Captain Seafood restaurant that specializes in seafood should be quite popular and profitable. Write a response in which you discuss what questions would need to be addressed in order to decide whether the conclusion and the argument on which it is based are reasonable. Be sure to explain how the answers to the questions would help to evaluate the conclusion.", EssayType.argument), Essay( "The following appeared as a letter to the editor from the owner of a skate shop in Central Plaza. 'Two years ago the city council voted to prohibit skateboarding in Central Plaza. They claimed that skateboard users were responsible for litter and vandalism that were keeping other visitors from coming to the plaza. In the past two years, however, there has been only a small increase in the number of visitors to Central Plaza, and litter and vandalism are still problematic. Skateboarding is permitted in Monroe Park, however, and there is no problem with litter or vandalism there. In order to restore Central Plaza to its former glory, then, we recommend that the city lift its prohibition on skateboarding in the plaza.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared as part of an article in a Dillton newspaper. 'In an effort to bring new jobs to Dillton and stimulate the city's flagging economy, Dillton's city council voted last year to lower the city's corporate tax rate by 15 percent; at the same time, the city began offering generous relocation grants to any company that would move to Dillton. Since these changes went into effect, two new factories have opened in Dillton. Although the two factories employ more than 1,000 people, the unemployment rate in Dillton remains unchanged. The only clear explanation for this is that the new factories are staffed with out-of-town workers rather than Dillton residents.' Write a response in which you discuss one or more alternative explanations that could rival the proposed explanation and explain how your explanation(s) can plausibly account for the facts presented in the argument.", EssayType.argument), Essay( "The following appeared in a memo from New Ventures Consulting to the president of HobCo, Inc., a chain of hobby shops. 'Our team has completed its research on suitable building sites for a new HobCo hobby Shop in the city of Grilldon. We discovered that there are currently no hobby shops in southeastern Grilldon. When our researchers conducted a poll of area residents, 88 percent of those who responded indicated that they would welcome the opening of a hobby shop in southeastern Grilldon. Grilldon is in a region of the nation in which the hobby business has increased by 300 percent during the past decade. In addition, Grilldon has a very large population of retirees, a demographic with ample time to devote to hobbies. We therefore recommend that you choose southeastern Grilldon as the site for your next HobCo Hobby Shop. We predict that a shop in this area will draw a steady stream of enthusiastic new HobCo customers.' Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation is likely to have the predicted result. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared in a newsletter published by the Appleton school district. 'In a recent study more than 5,000 adolescents were asked how often they ate meals with their families. Almost 30 percent of the teens said they ate at least seven meals per week with their families. Furthermore, according to the same survey, teens who reported having the most family meals per week were also the ones least likely to have tried illegal drugs, tobacco, and alcohol. Family meals were also associated with lower rates of problems such as low grades in school, low self-esteem, and depression. We therefore recommend that families have as many meals together as possible. We predict that doing so will greatly benefit adolescents and turn troubled teens away from bad behaviors.' Write a response in which you discuss which questions would need to be answered in order to decide whether the recommendation is likely to have the predicted result. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared in a health newsletter. 'Nosinia is an herb that many users report to be as effective as prescription medications at fighting allergy symptoms. Researchers recently compared Nosinia to a placebo in 95 men and women with seasonal allergies to ragweed pollen. Participants in the study reported that neither Nosinia nor the placebo offered significant relief. However, for the most severe allergy symptoms, the researchers reported that Nosinia was more effective than the placebo in providing relief. Furthermore, at the end of the study, participants given Nosinia were more likely than participants given a placebo to report feeling healthier.We therefore recommend using Nosinia to help with your severe allergy symptoms. Write a response in which you discuss what questions would need to be answered in order to decide whether the recommendation and the argument on which it is based are reasonable. Be sure to explain how the answers to these questions would help to evaluate the recommendation.", EssayType.argument), Essay( "The following appeared on the Website Science News Today. 'In a recent survey of more than 5,000 adolescents, the teens who reported eating the most meals with their families were the least likely to use illegal drugs, tobacco, or alcohol. Family meals were also associated with higher grades, better self-esteem, and lower rates of depression. Almost 30 percent of the teens said they ate at least seven meals per week with their families. Clearly, having a high number of family meals keeps teens from engaging in bad behaviors.' Write a response in which you discuss one or more alternative explanations that could rival the proposed explanation and explain how your explanation(s) can plausibly account for the facts presented in the argument.", EssayType.argument), Essay( "According to an independent poll of 200 charitable organizations, overall donations of money to nonprofit groups increased last year, but educational institutions did not fare as well as other organizations. Donations to international aid groups increased the most (30 percent), followed by donations to environmental groups (23 percent), whereas donations to educational institutions actually decreased slightly (3 percent). Meanwhile, all of the major economic indicators suggest that consumer spending is higher than average this year, showing that potential donors have ample disposable income. Therefore, the clearest explanation for the decline in donations to educational institutions is that people actually value education less than they did in the past. Write a response in which you discuss one or more alternative explanations that could rival the proposed explanation and explain how your explanation(s) can plausibly account for the facts presented in the argument.", EssayType.argument), Essay( "The following appeared in a letter to the editor of a Relannian newspaper. Industry analysts report that the number of dairy farms in Relanna has increased by 25 percent over the last decade. Also, recent innovations in milking technology make it possible for farmers to significantly increase the efficiency of the milking process, allowing them to collect more milk in less time with minimal human intervention. In fact, data from the Relannian Department of Agriculture indicate that labor costs at the majority of Relannian dairy farms are actually lower now than they were ten years ago. Despite increased efficiency and lower labor costs, a carton of cream — a dairy product made from milk — at the local food market costs twice as much as it did two years ago. The only explanation for this dramatic price increase is that farmers are inflating the price of cream to increase their profits. Write a response in which you discuss one or more alternative explanations that could rival the proposed explanation and explain how your explanation(s) can plausibly account for the facts presented in the argument.", EssayType.argument), ];
0
mirrored_repositories/FlutterGREWords/lib
mirrored_repositories/FlutterGREWords/lib/services/firestore_service.dart
import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter_gre/models/essay_model.dart'; class FirestoreService { Firestore _db = Firestore.instance; Future uploadEssay( String question, String type, String text, bool public, String uid) { return _db.collection('essays').document().setData({ "question": question, "type": type, "text": text, "public": public, "uid": uid, "timestamp": DateTime.now().millisecondsSinceEpoch, }); } Future<List<EssayModel>> getUserEssays(String uid) async { var docs = await _db .collection('essays') .where("uid", isEqualTo: uid) .getDocuments(); return docs.documents .map((e) => EssayModel.fromJson(e.data, e.documentID)) .toList(); } }
0
mirrored_repositories/FlutterGREWords
mirrored_repositories/FlutterGREWords/test/widget_test.dart
// This is a basic Flutter widget test. // // To perform an interaction with a widget in your test, use the WidgetTester // utility that Flutter provides. For example, you can send tap and scroll // gestures. You can also use WidgetTester to find child widgets in the widget // tree, read text, and verify that the values of widget properties are correct. import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_gre/main.dart'; void main() { testWidgets('Counter increments smoke test', (WidgetTester tester) async { // Build our app and trigger a frame. await tester.pumpWidget(MyApp()); // Verify that our counter starts at 0. expect(find.text('0'), findsOneWidget); expect(find.text('1'), findsNothing); // Tap the '+' icon and trigger a frame. await tester.tap(find.byIcon(Icons.add)); await tester.pump(); // Verify that our counter has incremented. expect(find.text('0'), findsNothing); expect(find.text('1'), findsOneWidget); }); }
0
mirrored_repositories/simple_xo
mirrored_repositories/simple_xo/lib/main.dart
import 'package:flutter/material.dart'; class BoxValue { String player; String number; BoxValue({ required this.player, required this.number, }); } void main() { runApp(const MainApp()); } class MainApp extends StatelessWidget { const MainApp({super.key}); @override Widget build(BuildContext context) { return const MaterialApp( home: GScreen(), ); } } class GScreen extends StatefulWidget { const GScreen({super.key}); @override State<GScreen> createState() => _GScreenState(); } class _GScreenState extends State<GScreen> with SingleTickerProviderStateMixin { late AnimationController _controller; bool isXPlayer = false; bool isOPlayer = true; List<BoxValue> boxValues = List.generate(9, (index) => BoxValue(player: '', number: '$index')); List<bool> boxDisabled = List.generate(9, (index) => false); // PLayer win // 0 1 2 // 3 4 5 // 6 7 8 // boxValues[0].player == boxValues[1].player == boxValues[2].player // boxValues[3].player == boxValues[4].player == boxValues[5].player // boxValues[6].player == boxValues[7].player == boxValues[8].player // boxValues[0].player == boxValues[3].player == boxValues[6].player // boxValues[1].player == boxValues[4].player == boxValues[7].player // boxValues[0].player == boxValues[4].player == boxValues[9].player // boxValues[2].player == boxValues[5].player == boxValues[8].player void checkForWin(BuildContext context) { final List<List<int>> winningCombinations = [ [0, 1, 2], [3, 4, 5], [6, 7, 8], [0, 3, 6], [1, 4, 7], [2, 5, 8], [0, 4, 8], [2, 4, 6], ]; // Iterate through winning combinations for (final List<int> combination in winningCombinations) { final String player = boxValues[combination[0]].player; if (player.isNotEmpty && player == boxValues[combination[1]].player && player == boxValues[combination[2]].player) { showCustomDialog(context); return; } } } void resetXO() { setState(() { for (var box in boxValues) { box.player = ''; } boxDisabled = List.generate(9, (index) => false); }); } void showCustomDialog(BuildContext context) { showDialog( context: context, builder: (BuildContext context) { return AlertDialog( title: const Text('Winner'), content: Text( isOPlayer ? 'Player X' : 'Player O', style: const TextStyle( fontSize: 20, ), ), actions: <Widget>[ TextButton( onPressed: () { // Close the dialog resetXO(); Navigator.of(context).pop(); }, child: const Text('OK'), ), ], ); }, ); } @override void initState() { super.initState(); _controller = AnimationController(vsync: this); } @override void dispose() { _controller.dispose(); super.dispose(); } void play(BoxValue boxvalue) {} @override Widget build(BuildContext context) { return Scaffold( body: Padding( padding: const EdgeInsets.symmetric(vertical: 50, horizontal: 10), child: SizedBox( width: double.infinity, child: Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ buildPlayerText(), const SizedBox( height: 2, ), buildGameGrid(), const SizedBox( height: 20, ), buildRestartButton(), ], ), ), ), ); } Widget buildPlayerText() { return Text( isOPlayer ? 'Player O' : 'Player X', style: const TextStyle(fontSize: 30, letterSpacing: 2), ); } Widget buildGameGrid() { return Container( padding: const EdgeInsets.all(20), height: 430, decoration: BoxDecoration( // color: Colors.greenAccent, borderRadius: BorderRadius.circular(10), ), child: GridView( gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: 3, mainAxisSpacing: 10, crossAxisSpacing: 10, ), children: List.generate( 9, (index) => customBox( boxValue: boxValues[index], func: () { if (!boxDisabled[index]) { setState(() { boxValues[index].player = isOPlayer ? 'O' : 'X'; isOPlayer = !isOPlayer; boxDisabled[index] = true; // Disable the InkWell checkForWin(context); }); } }, // disabled: boxDisabled[index], ), ), ), ); } Widget buildRestartButton() { return GestureDetector( onTap: resetXO, child: Container( height: 50, decoration: BoxDecoration( color: Colors.black, borderRadius: BorderRadius.circular(10)), child: const Row( mainAxisAlignment: MainAxisAlignment.center, children: [ Icon( Icons.restart_alt, color: Colors.grey, size: 20, ), SizedBox(width: 10), Text( 'Restart', style: TextStyle(color: Colors.grey, fontSize: 18), ), ], ), ), ); } Widget customBox({required BoxValue boxValue, required Function() func}) { return InkWell( onTap: func, child: Container( decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(10), boxShadow: [ BoxShadow( color: Colors.black.withOpacity(0.5), blurRadius: 5, spreadRadius: 2, offset: const Offset(-3, -3)), ]), child: Center( child: Text( boxValue.player, style: const TextStyle(fontSize: 80, fontWeight: FontWeight.w300), ), ), ), ); } }
0
mirrored_repositories/cloud_finance_responsive_ui
mirrored_repositories/cloud_finance_responsive_ui/lib/main.dart
import 'package:cloud_finance_responsive_ui/constants/app_colors.dart'; import 'package:cloud_finance_responsive_ui/screens/main_screen.dart'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; void main() { runApp(const MainApp()); } class MainApp extends StatelessWidget { const MainApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, title: 'Cloud Finance UI', theme: ThemeData.light().copyWith( scaffoldBackgroundColor: AppColors.scaffoldBackgroundColor, textTheme: GoogleFonts.poppinsTextTheme(Theme.of(context).textTheme) .apply(bodyColor: AppColors.black), ), home: const MainScreen(), ); } }
0
mirrored_repositories/cloud_finance_responsive_ui/lib
mirrored_repositories/cloud_finance_responsive_ui/lib/constants/app_colors.dart
import 'package:flutter/material.dart'; class AppColors { AppColors._(); static const Color scaffoldBackgroundColor = Color(0xfff6f6f8); static const Color blue = Color(0xff377cf6); static const Color lightBlue = Color(0xff95e0fb); static const Color black = Color(0xFF000000); static const Color white = Color(0xFFffffff); static const Color green = Color(0xFF65c382); static const Color backgroundgreen = Color(0xFFe6f5eb); static const Color grey = Color(0xffadaeb1); static const Color red = Color(0xffee3939); static const Color transparent = Colors.transparent; }
0
mirrored_repositories/cloud_finance_responsive_ui/lib
mirrored_repositories/cloud_finance_responsive_ui/lib/constants/material_icons.dart
import 'package:flutter/material.dart'; class AppMaterialIcons { AppMaterialIcons._(); //Drawer Icons static const IconData cloud = Icons.cloud_rounded; static const IconData overview = Icons.widgets_rounded; static const IconData statistics = Icons.equalizer_rounded; static const IconData savings = Icons.wallet_rounded; static const IconData portfolios = Icons.pie_chart_rounded; static const IconData message = Icons.message_rounded; static const IconData transactions = Icons.receipt_rounded; static const IconData settings = Icons.settings; static const IconData appearances = Icons.image_rounded; static const IconData needHelp = Icons.help_rounded; static const IconData logout = Icons.logout_rounded; //Header static const IconData notification = Icons.notifications_none; static const IconData search = Icons.search; //Overview static const IconData earnings = Icons.monetization_on_outlined; static const IconData spending = Icons.shopping_cart_outlined; static const IconData piggybank = Icons.savings_outlined; static const IconData investment = Icons.score_outlined; static const IconData upArrow = Icons.arrow_upward; static const IconData downArrow = Icons.arrow_downward; //Total Savings static const IconData threeDot = Icons.more_horiz; //Latest Transaction static const IconData profile = Icons.account_circle_outlined; static const IconData link = Icons.link; static const IconData delete = Icons.delete_outline; }
0
mirrored_repositories/cloud_finance_responsive_ui/lib
mirrored_repositories/cloud_finance_responsive_ui/lib/constants/constants.dart
export 'app_colors.dart'; export 'app_images.dart'; export 'app_strings.dart'; export 'material_icons.dart'; export 'package:flutter/material.dart';
0
mirrored_repositories/cloud_finance_responsive_ui/lib
mirrored_repositories/cloud_finance_responsive_ui/lib/constants/app_images.dart
class AppImages { AppImages._(); //Profile pic static const String profilePic = "assets/images/profilePic.jpeg"; }
0
mirrored_repositories/cloud_finance_responsive_ui/lib
mirrored_repositories/cloud_finance_responsive_ui/lib/constants/app_strings.dart
class AppStrings { AppStrings._(); //DrawerItems Text static const String cloudFinance = "Cloud Finance"; static const String menu = "MENU"; static const String overview = "Overview"; static const String statistics = "Statistics"; static const String savings = "savings"; static const String portfolios = "Portfolios"; static const String messages = "Messages"; static const String transactions = "Transactions"; static const String general = "GENERAL"; static const String settings = "Settings"; static const String appearances = "Appearances"; static const String needHelp = "Need Help?"; static const String logout = "Log Out"; // Header Text static const String dashboard = "Dashboard"; static const String searchHere = "Search here"; static const String marufHassan = "Maruf Hassan"; static const String marufEmail = "[email protected]"; //Overview Text static const String earnings = "Earnings"; static const String spendings = "Spendings"; static const String saving = "Savings"; static const String investment = "Investment"; //TotalSavings Text static const String dreamStudio = "Dream Studio"; static const String education = "Education"; static const String healthCare = "Health Care"; //LatestTransaction Text static const String latestTransaction = "Latest Transaction"; static const String toFrom = "To/From"; static const String date = "Date"; static const String description = "Description"; static const String amount = "Amount"; static const String status = "Status"; static const String action = "Action"; static const String viewAll = "View all"; }
0
mirrored_repositories/cloud_finance_responsive_ui/lib
mirrored_repositories/cloud_finance_responsive_ui/lib/widgets/overview_info_card.dart
import 'package:cloud_finance_responsive_ui/constants/constants.dart'; import 'package:cloud_finance_responsive_ui/model/overview_data.dart'; class OverviewInfoCard extends StatelessWidget { const OverviewInfoCard({ Key? key, required this.overviewInfo, }) : super(key: key); final OverviewData overviewInfo; @override Widget build(BuildContext context) { return Container( padding: const EdgeInsets.symmetric(horizontal: 20), decoration: const BoxDecoration( color: AppColors.white, borderRadius: BorderRadius.all(Radius.circular(10)), ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisSize: MainAxisSize.min, children: [ Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ Icon( overviewInfo.icon, color: AppColors.grey, ), const SizedBox(width: 10), Text( overviewInfo.title, style: const TextStyle(color: AppColors.grey, fontSize: 16), ), ], ), Row( children: [ Text( overviewInfo.amount, style: const TextStyle(fontSize: 30, fontWeight: FontWeight.bold), ), const SizedBox(width: 10), Chip( label: Row( children: [ Icon( overviewInfo.arrow, size: 15, color: overviewInfo.textColor, ), Text( overviewInfo.percentChange, style: TextStyle( color: overviewInfo.textColor, fontWeight: FontWeight.bold, fontSize: 12, ), ), ], ), backgroundColor: overviewInfo.color, ), ], ), RichText( text: TextSpan( children: [ TextSpan( text: overviewInfo.amountChange, style: const TextStyle( color: AppColors.green, fontWeight: FontWeight.bold, ), ), const TextSpan( text: ' than last month', style: TextStyle(color: AppColors.grey), ), ], ), ), ], ), ); } }
0
mirrored_repositories/cloud_finance_responsive_ui/lib
mirrored_repositories/cloud_finance_responsive_ui/lib/widgets/bar_chart.dart
import 'package:cloud_finance_responsive_ui/constants/constants.dart'; import 'package:fl_chart/fl_chart.dart'; class StatisticsBarChart extends StatefulWidget { const StatisticsBarChart({super.key}); @override State<StatefulWidget> createState() => StatisticsBarChartState(); } class StatisticsBarChartState extends State<StatisticsBarChart> { final double width = 30; late List<BarChartGroupData> rawBarGroups; late List<BarChartGroupData> showingBarGroups; int touchedGroupIndex = -1; @override void initState() { super.initState(); final barGroup1 = makeGroupData(0, 12, 6); final barGroup2 = makeGroupData(1, 16, 10); final barGroup3 = makeGroupData(2, 8, 4); final barGroup4 = makeGroupData(3, 16, 14); final barGroup5 = makeGroupData(4, 19, 8); final barGroup6 = makeGroupData(4, 17, 9); final items = [ barGroup1, barGroup2, barGroup3, barGroup4, barGroup5, barGroup6, ]; rawBarGroups = items; showingBarGroups = rawBarGroups; } @override Widget build(BuildContext context) { return AspectRatio( aspectRatio: 2, child: Container( padding: const EdgeInsets.all(20), decoration: const BoxDecoration( color: AppColors.white, borderRadius: BorderRadius.all(Radius.circular(10)), ), child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: <Widget>[ Row( // mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: <Widget>[ const Text( "Statistics", style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold), ), Row( children: [ Row( children: [ Container( height: 10, width: 10, decoration: BoxDecoration( color: Colors.blue[700], shape: BoxShape.circle, ), ), const SizedBox(width: 5), const Text( "Earnings", style: TextStyle( fontSize: 14, fontWeight: FontWeight.bold), ), ], ), const SizedBox(width: 10), Row( children: [ Container( height: 10, width: 10, decoration: BoxDecoration( color: Colors.blue[400], shape: BoxShape.circle, ), ), const SizedBox(width: 5), const Text( "Spendings", style: TextStyle( fontSize: 14, fontWeight: FontWeight.bold), ), ], ), const SizedBox(width: 10), Container( padding: const EdgeInsets.all(10), decoration: const BoxDecoration( color: AppColors.scaffoldBackgroundColor, borderRadius: BorderRadius.all(Radius.circular(10)), ), child: const Row( children: [ Text( "Yearly", style: TextStyle( fontSize: 14, fontWeight: FontWeight.bold, ), ), SizedBox(width: 5), Icon(AppMaterialIcons.downArrow, size: 20), ], ), ), ], ), ], ), const SizedBox( height: 38, ), Expanded( child: BarChart( BarChartData( maxY: 20, barTouchData: BarTouchData( touchTooltipData: BarTouchTooltipData( tooltipBgColor: Colors.grey, getTooltipItem: (a, b, c, d) => null, ), ), titlesData: FlTitlesData( show: true, rightTitles: const AxisTitles( sideTitles: SideTitles(showTitles: false), ), topTitles: const AxisTitles( sideTitles: SideTitles(showTitles: false), ), bottomTitles: AxisTitles( sideTitles: SideTitles( showTitles: true, getTitlesWidget: bottomTitles, reservedSize: 35, ), ), leftTitles: AxisTitles( sideTitles: SideTitles( showTitles: true, reservedSize: 50, interval: 1, getTitlesWidget: leftTitles, ), ), ), borderData: FlBorderData( show: false, ), barGroups: showingBarGroups, gridData: const FlGridData(show: false), ), ), ), ], ), ), ); } Widget leftTitles(double value, TitleMeta meta) { const style = TextStyle( color: Color(0xff7589a2), fontWeight: FontWeight.bold, fontSize: 14, ); String text; if (value == 0) { text = '0'; } else if (value == 4) { text = '\$200'; } else if (value == 8) { text = '\$400'; } else if (value == 12) { text = '\$600'; } else if (value == 16) { text = '\$800'; } else if (value == 20) { text = '\$1000'; } else { return Container(); } return SideTitleWidget( axisSide: meta.axisSide, space: 0, child: Text(text, style: style), ); } Widget bottomTitles(double value, TitleMeta meta) { final titles = <String>['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']; final Widget text = Text( titles[value.toInt()], style: const TextStyle( color: Color(0xff7589a2), fontWeight: FontWeight.bold, fontSize: 14, ), ); return SideTitleWidget( axisSide: meta.axisSide, space: 16, //margin top child: text, ); } BarChartGroupData makeGroupData(int x, double y1, double y2) { return BarChartGroupData( barsSpace: 8, x: x, barRods: [ BarChartRodData( toY: y1, color: AppColors.blue, width: width, ), BarChartRodData( toY: y2, color: AppColors.lightBlue, width: width, ), ], ); } }
0
mirrored_repositories/cloud_finance_responsive_ui/lib
mirrored_repositories/cloud_finance_responsive_ui/lib/widgets/widgets.dart
export 'bar_chart.dart'; export 'header.dart'; export 'latest_transaction.dart'; export 'overview_info_card.dart'; export 'overview_section.dart'; export 'progress_bar.dart'; export 'side_menu.dart'; export 'total_savings.dart';
0
mirrored_repositories/cloud_finance_responsive_ui/lib
mirrored_repositories/cloud_finance_responsive_ui/lib/widgets/overview_section.dart
import 'package:cloud_finance_responsive_ui/constants/constants.dart'; import 'package:cloud_finance_responsive_ui/model/overview_data.dart'; import 'package:cloud_finance_responsive_ui/utils/responsive.dart'; import 'package:cloud_finance_responsive_ui/widgets/widgets.dart'; class OverviewSection extends StatelessWidget { const OverviewSection({ Key? key, }) : super(key: key); @override Widget build(BuildContext context) { final Size size = MediaQuery.sizeOf(context); return Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( AppStrings.overview, style: Theme.of(context) .textTheme .titleLarge ?.copyWith(fontSize: 25, fontWeight: FontWeight.w600), ), ], ), const SizedBox(height: 16), //BUG: Responsiveness issue needs to be fixed Responsive( mobile: OverviewInfoCardGridView( crossAxisCount: size.width < 650 ? 2 : 4, childAspectRatio: size.width < 650 && size.width > 350 ? 1.3 : 1, ), tablet: const OverviewInfoCardGridView(), desktop: OverviewInfoCardGridView( childAspectRatio: size.width < 1400 ? 1.1 : 1.4, ), ), ], ); } } class OverviewInfoCardGridView extends StatelessWidget { const OverviewInfoCardGridView({ Key? key, this.crossAxisCount = 4, this.childAspectRatio = 1.5, }) : super(key: key); final int crossAxisCount; final double childAspectRatio; @override Widget build(BuildContext context) { return GridView.builder( physics: const NeverScrollableScrollPhysics(), shrinkWrap: true, itemCount: overviewDataDetails.length, gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: crossAxisCount, crossAxisSpacing: 16, mainAxisSpacing: 16, childAspectRatio: childAspectRatio, ), itemBuilder: (context, index) => OverviewInfoCard(overviewInfo: overviewDataDetails[index]), ); } }
0
mirrored_repositories/cloud_finance_responsive_ui/lib
mirrored_repositories/cloud_finance_responsive_ui/lib/widgets/progress_bar.dart
import 'package:cloud_finance_responsive_ui/constants/constants.dart'; class ProgressBar extends StatelessWidget { final double max; final double current; final Color color; const ProgressBar( {Key? key, required this.max, required this.current, this.color = AppColors.grey}) : super(key: key); @override Widget build(BuildContext context) { return LayoutBuilder( builder: (_, boxConstraints) { var x = boxConstraints.maxWidth; var percent = (current / max) * x; return Stack( children: [ Container( width: x, height: 10, decoration: BoxDecoration( color: AppColors.scaffoldBackgroundColor, borderRadius: BorderRadius.circular(35), ), ), AnimatedContainer( duration: const Duration(milliseconds: 500), width: percent, height: 10, decoration: BoxDecoration( color: color, borderRadius: BorderRadius.circular(35), ), ), ], ); }, ); } }
0
mirrored_repositories/cloud_finance_responsive_ui/lib
mirrored_repositories/cloud_finance_responsive_ui/lib/widgets/total_savings.dart
import 'package:cloud_finance_responsive_ui/constants/constants.dart'; import 'package:cloud_finance_responsive_ui/widgets/widgets.dart'; class TotalSavings extends StatelessWidget { const TotalSavings({super.key}); @override Widget build(BuildContext context) { return Container( padding: const EdgeInsets.all(20), decoration: const BoxDecoration( color: AppColors.white, borderRadius: BorderRadius.all(Radius.circular(10)), ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ const Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( 'Total Savings', style: TextStyle(color: AppColors.grey, fontSize: 16), ), Icon( AppMaterialIcons.threeDot, color: AppColors.grey, ), ], ), const Row( children: [ Text( '\$406.27', style: TextStyle(fontSize: 35, fontWeight: FontWeight.bold), ), SizedBox(width: 10), Chip( label: Row( children: [ Icon( AppMaterialIcons.upArrow, size: 15, color: AppColors.green, ), Text( '8.2%', style: TextStyle( color: AppColors.green, fontWeight: FontWeight.bold, fontSize: 12), ), ], ), backgroundColor: AppColors.backgroundgreen, ), ], ), RichText( text: const TextSpan( children: [ TextSpan( text: '+ \$33.3', style: TextStyle( color: AppColors.green, fontWeight: FontWeight.bold), ), TextSpan( text: ' than last month', style: TextStyle(color: AppColors.grey), ), ], ), ), const Divider(), const SizedBox(height: 10), Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ const Text( AppStrings.dreamStudio, style: TextStyle(fontWeight: FontWeight.bold), ), RichText( text: const TextSpan( children: [ TextSpan( text: '\$251.9', style: TextStyle(fontWeight: FontWeight.bold), ), TextSpan( text: '/\$750', style: TextStyle(color: AppColors.grey), ), ], ), ), ], ), const SizedBox(height: 10), const ProgressBar( current: 40, max: 100, color: AppColors.blue, ), const SizedBox(height: 20), ], ), Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ const Text( AppStrings.education, style: TextStyle(fontWeight: FontWeight.bold), ), RichText( text: const TextSpan( children: [ TextSpan( text: '\$183.8', style: TextStyle(fontWeight: FontWeight.bold), ), TextSpan( text: '/\$200', style: TextStyle(color: AppColors.grey), ), ], ), ), ], ), const SizedBox(height: 10), const ProgressBar( current: 85, max: 100, color: AppColors.blue, ), const SizedBox(height: 20), ], ), Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ const Text( AppStrings.dreamStudio, style: TextStyle(fontWeight: FontWeight.bold), ), RichText( text: const TextSpan( children: [ TextSpan( text: '\$30.8', style: TextStyle(fontWeight: FontWeight.bold), ), TextSpan( text: '/\$150', style: TextStyle(color: AppColors.grey), ), ], ), ), ], ), const SizedBox(height: 10), const ProgressBar( current: 20, max: 100, color: AppColors.blue, ), const SizedBox(height: 20), ], ), ], ), ); } }
0
mirrored_repositories/cloud_finance_responsive_ui/lib
mirrored_repositories/cloud_finance_responsive_ui/lib/widgets/header.dart
import 'package:cloud_finance_responsive_ui/constants/constants.dart'; import 'package:cloud_finance_responsive_ui/utils/responsive.dart'; class Header extends StatelessWidget { const Header({super.key}); @override Widget build(BuildContext context) { return Container( color: AppColors.white, padding: const EdgeInsets.all(20), child: Row( children: [ if (!Responsive.isDesktop(context)) IconButton(icon: const Icon(Icons.menu), onPressed: () {}), if (!Responsive.isMobile(context)) Padding( padding: EdgeInsets.symmetric( horizontal: (Responsive.isMobile(context)) ? 10 : 0), child: Text( AppStrings.dashboard, style: Theme.of(context).textTheme.titleLarge, ), ), if (!Responsive.isMobile(context)) Spacer(flex: Responsive.isDesktop(context) ? 2 : 1), const Expanded(child: SearchField()), const ProfileCard() ], ), ); } } class ProfileCard extends StatelessWidget { const ProfileCard({ Key? key, }) : super(key: key); @override Widget build(BuildContext context) { return Row( children: [ const CircleAvatar( minRadius: 22, backgroundImage: AssetImage( AppImages.profilePic, ), ), if (!Responsive.isMobile(context)) const Padding( padding: EdgeInsets.symmetric(horizontal: 8), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( AppStrings.marufHassan, style: TextStyle(fontWeight: FontWeight.bold), ), Text( AppStrings.marufEmail, style: TextStyle( fontWeight: FontWeight.w300, color: AppColors.grey, fontSize: 12, ), ), ], ), ), ], ); } } //BUG: Fix the responsiveness issue when turning to tablet class SearchField extends StatelessWidget { const SearchField({ Key? key, }) : super(key: key); @override Widget build(BuildContext context) { return Row( mainAxisAlignment: MainAxisAlignment.start, children: [ Flexible( child: Container( decoration: const BoxDecoration( color: AppColors.scaffoldBackgroundColor, borderRadius: BorderRadius.all(Radius.circular(10)), ), padding: const EdgeInsets.all(12), child: const Row( children: [ Icon(AppMaterialIcons.search), SizedBox(width: 10), Text( AppStrings.searchHere, style: TextStyle( color: AppColors.grey, fontSize: 14, overflow: TextOverflow.ellipsis), ), ], ), ), ), Container( padding: const EdgeInsets.all(12), margin: const EdgeInsets.symmetric(horizontal: 16 / 2), decoration: const BoxDecoration( color: AppColors.scaffoldBackgroundColor, borderRadius: BorderRadius.all(Radius.circular(10)), ), child: const Icon(AppMaterialIcons.notification), ), ], ); } }
0
mirrored_repositories/cloud_finance_responsive_ui/lib
mirrored_repositories/cloud_finance_responsive_ui/lib/widgets/side_menu.dart
import 'package:cloud_finance_responsive_ui/constants/constants.dart'; class SideMenu extends StatelessWidget { const SideMenu({ Key? key, }) : super(key: key); @override Widget build(BuildContext context) { return Drawer( backgroundColor: AppColors.white, elevation: 4, child: Padding( padding: const EdgeInsets.all(16.0), child: ListView( children: const [ SizedBox(height: 15), Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.center, children: [ Icon( AppMaterialIcons.cloud, size: 30, color: AppColors.blue, ), SizedBox(width: 20), Flexible( child: Text( AppStrings.cloudFinance, style: TextStyle( fontSize: 20, fontWeight: FontWeight.bold, ), ), ), ], ), SizedBox(height: 35), Text( AppStrings.menu, style: TextStyle( fontSize: 14, fontWeight: FontWeight.bold, letterSpacing: 1.5, ), ), SizedBox(height: 15), DrawerListTileItem( title: AppStrings.overview, materialIcon: AppMaterialIcons.overview, tapColor: true, ), DrawerListTileItem( title: AppStrings.statistics, materialIcon: AppMaterialIcons.statistics, ), DrawerListTileItem( title: AppStrings.savings, materialIcon: AppMaterialIcons.savings, ), DrawerListTileItem( title: AppStrings.portfolios, materialIcon: AppMaterialIcons.portfolios, ), DrawerListTileItem( title: AppStrings.messages, materialIcon: AppMaterialIcons.message, ), DrawerListTileItem( title: AppStrings.transactions, materialIcon: AppMaterialIcons.transactions, ), SizedBox(height: 15), Text( AppStrings.general, style: TextStyle( fontSize: 14, fontWeight: FontWeight.bold, letterSpacing: 1.5, ), ), SizedBox(height: 15), DrawerListTileItem( title: AppStrings.settings, materialIcon: AppMaterialIcons.settings, ), DrawerListTileItem( title: AppStrings.appearances, materialIcon: AppMaterialIcons.appearances, ), DrawerListTileItem( title: AppStrings.needHelp, materialIcon: AppMaterialIcons.needHelp, ), SizedBox(height: 100), DrawerListTileItem( title: AppStrings.logout, materialIcon: AppMaterialIcons.logout, ), ], ), ), ); } } class DrawerListTileItem extends StatelessWidget { final String title; final IconData materialIcon; final bool tapColor; const DrawerListTileItem({ super.key, required this.title, required this.materialIcon, this.tapColor = false, }); @override Widget build(BuildContext context) { return Container( padding: const EdgeInsets.all(15), decoration: BoxDecoration( borderRadius: BorderRadius.circular(10), color: tapColor ? AppColors.blue : AppColors.transparent, ), child: Row( children: [ Icon( materialIcon, color: tapColor ? AppColors.white : AppColors.grey, ), const SizedBox(width: 10), Text( title, style: TextStyle( color: tapColor ? AppColors.white : AppColors.grey, ), ), ], ), ); } }
0
mirrored_repositories/cloud_finance_responsive_ui/lib
mirrored_repositories/cloud_finance_responsive_ui/lib/widgets/latest_transaction.dart
import 'package:cloud_finance_responsive_ui/constants/constants.dart'; import 'package:cloud_finance_responsive_ui/model/transaction_data.dart'; class LatestTransaction extends StatelessWidget { const LatestTransaction({super.key}); @override Widget build(BuildContext context) { return Container( padding: const EdgeInsets.all(20), decoration: const BoxDecoration( color: AppColors.white, borderRadius: BorderRadius.all(Radius.circular(10)), ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ const Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( AppStrings.latestTransaction, style: TextStyle( fontSize: 18, fontWeight: FontWeight.bold, ), ), Text( AppStrings.viewAll, style: TextStyle( color: Colors.blue, fontWeight: FontWeight.bold, ), ), ], ), SizedBox( width: double.infinity, child: DataTable( columnSpacing: 16, columns: const [ DataColumn( label: Text( AppStrings.toFrom, style: TextStyle(color: AppColors.grey), ), ), DataColumn( label: Text( AppStrings.date, style: TextStyle(color: AppColors.grey), ), ), DataColumn( label: Text( AppStrings.description, style: TextStyle(color: AppColors.grey), ), ), DataColumn( label: Text( AppStrings.amount, style: TextStyle(color: AppColors.grey), ), ), DataColumn( label: Text( AppStrings.status, style: TextStyle(color: AppColors.grey), ), ), DataColumn( label: Text( AppStrings.action, style: TextStyle(color: AppColors.grey), ), ), ], rows: List.generate( transactionDataDetails.length, (index) => recentFileDataRow(transactionDataDetails[index]), ), ), ), ], ), ); } } DataRow recentFileDataRow(TransactionData transactionData) { return DataRow( cells: [ DataCell( Row( children: [ const Icon( AppMaterialIcons.profile, color: AppColors.grey, ), Padding( padding: const EdgeInsets.symmetric(horizontal: 16), child: Text( transactionData.title, style: const TextStyle(fontWeight: FontWeight.bold), ), ), ], ), ), DataCell( Text( transactionData.date, style: const TextStyle(color: AppColors.grey), ), ), DataCell( Text( transactionData.description, style: const TextStyle( fontWeight: FontWeight.bold, ), ), ), DataCell( Text( transactionData.amount, style: const TextStyle( color: AppColors.green, fontWeight: FontWeight.bold), ), ), DataCell( Container( padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 5), decoration: BoxDecoration( color: AppColors.white, borderRadius: const BorderRadius.all(Radius.circular(20)), border: Border.all(color: AppColors.green)), child: Text( transactionData.status, style: const TextStyle( color: AppColors.green, fontWeight: FontWeight.bold), ), ), ), const DataCell( Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ Icon( AppMaterialIcons.link, color: AppColors.grey, ), Icon( AppMaterialIcons.delete, color: AppColors.grey, ), Icon( AppMaterialIcons.threeDot, color: AppColors.grey, ), ], ), ), ], ); }
0
mirrored_repositories/cloud_finance_responsive_ui/lib
mirrored_repositories/cloud_finance_responsive_ui/lib/model/transaction_data.dart
class TransactionData { final bool checked; final String title; final String date; final String description; final String amount; final String status; TransactionData({ this.checked = false, required this.title, required this.date, required this.description, required this.amount, required this.status, }); } List transactionDataDetails = [ TransactionData( title: 'Elevate Agency', date: '2 Oct 2023', description: 'Monthly salary', amount: '+\$1500.0', status: 'Success', ), TransactionData( title: 'Zyllus Tech', date: '12 Nov 2023', description: 'Monthly salary', amount: '+\$1900.0', status: 'Success', ), TransactionData( title: 'Zeref Inc', date: '15 Dec 2023', description: 'Monthly salary', amount: '+\$1000.0', status: 'Success', ), ];
0
mirrored_repositories/cloud_finance_responsive_ui/lib
mirrored_repositories/cloud_finance_responsive_ui/lib/model/overview_data.dart
import 'package:cloud_finance_responsive_ui/constants/constants.dart'; class OverviewData { final String title; final IconData icon; final IconData arrow; final String amount; final String percentChange; final String amountChange; final Color color; final Color textColor; OverviewData({ required this.title, required this.icon, required this.arrow, required this.amount, required this.percentChange, required this.amountChange, required this.color, required this.textColor, }); } List overviewDataDetails = [ OverviewData( icon: AppMaterialIcons.earnings, arrow: AppMaterialIcons.upArrow, title: AppStrings.earnings, amount: "\$928.41", color: AppColors.backgroundgreen, percentChange: "12.8%", amountChange: "\$118.8", textColor: AppColors.green, ), OverviewData( icon: AppMaterialIcons.spending, arrow: AppMaterialIcons.downArrow, title: AppStrings.spendings, amount: "\$169.43", color: AppColors.red, percentChange: "3.1%", amountChange: "\$5.2", textColor: AppColors.white, ), OverviewData( icon: AppMaterialIcons.piggybank, arrow: AppMaterialIcons.upArrow, title: AppStrings.saving, amount: "\$406.27", color: AppColors.backgroundgreen, percentChange: "8.2%", amountChange: "\$33.3", textColor: AppColors.green, ), OverviewData( icon: AppMaterialIcons.investment, arrow: AppMaterialIcons.upArrow, title: AppStrings.investment, amount: "\$1854.08", color: AppColors.backgroundgreen, percentChange: "9.2%", amountChange: "\$78.5", textColor: AppColors.green, ), ];
0
mirrored_repositories/cloud_finance_responsive_ui/lib
mirrored_repositories/cloud_finance_responsive_ui/lib/utils/responsive.dart
import 'package:flutter/material.dart'; class Responsive extends StatelessWidget { final Widget mobile; final Widget? tablet; final Widget desktop; const Responsive({ Key? key, required this.mobile, this.tablet, required this.desktop, }) : super(key: key); static bool isMobile(BuildContext context) => MediaQuery.sizeOf(context).width < 850; static bool isTablet(BuildContext context) => MediaQuery.sizeOf(context).width < 1100 && MediaQuery.sizeOf(context).width >= 850; static bool isDesktop(BuildContext context) => MediaQuery.sizeOf(context).width >= 1100; @override Widget build(BuildContext context) { final Size size = MediaQuery.sizeOf(context); // If our width is more than 1100 then we consider it a desktop if (size.width >= 1100) { return desktop; } // If width it less then 1100 and more then 850 we consider it as tablet else if (size.width >= 850 && tablet != null) { return tablet!; } // If width it less then 850 then it is considered mobile else { return mobile; } } }
0
mirrored_repositories/cloud_finance_responsive_ui/lib
mirrored_repositories/cloud_finance_responsive_ui/lib/screens/main_screen.dart
import 'package:cloud_finance_responsive_ui/constants/constants.dart'; import 'package:cloud_finance_responsive_ui/screens/dashboard_screen.dart'; import 'package:cloud_finance_responsive_ui/utils/responsive.dart'; import 'package:cloud_finance_responsive_ui/widgets/widgets.dart'; class MainScreen extends StatelessWidget { const MainScreen({super.key}); @override Widget build(BuildContext context) { return Scaffold( drawer: const SideMenu(), body: SafeArea( child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ if (Responsive.isDesktop(context)) const Expanded( flex: 1, child: SideMenu(), ), const Expanded( flex: 5, child: DashboardScreen(), ), ], ), ), ); } }
0
mirrored_repositories/cloud_finance_responsive_ui/lib
mirrored_repositories/cloud_finance_responsive_ui/lib/screens/dashboard_screen.dart
import 'package:cloud_finance_responsive_ui/constants/constants.dart'; import 'package:cloud_finance_responsive_ui/utils/responsive.dart'; import 'package:cloud_finance_responsive_ui/widgets/widgets.dart'; class DashboardScreen extends StatelessWidget { const DashboardScreen({super.key}); @override Widget build(BuildContext context) { return SafeArea( child: SingleChildScrollView( primary: false, child: Column( children: [ const Header(), const SizedBox(height: 20), Padding( padding: const EdgeInsets.all(20), child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ Expanded( flex: 5, child: Column( children: [ const OverviewSection(), const SizedBox(height: 20), const Row( children: [ Expanded(flex: 3, child: StatisticsBarChart()), SizedBox(width: 20), Expanded(flex: 2, child: TotalSavings()) ], ), const SizedBox(height: 20), const LatestTransaction(), if (Responsive.isMobile(context)) const SizedBox(height: 20), ], ), ), //BUG: Responsiveness not working for Tablet & Mobile properly // if (!Responsive.isMobile(context)) const SizedBox(width: 16), // if (!Responsive.isMobile(context)) // const Expanded( // flex: 2, // child: TotalSavings(), // ), ], ), ), ], ), ), ); } }
0
mirrored_repositories/flutter_thenetninja_tutorials
mirrored_repositories/flutter_thenetninja_tutorials/lib/main.dart
// ignore_for_file: prefer_const_constructors import 'package:flutter/material.dart'; void main() => runApp(MaterialApp( home: Home() )); class Home extends StatelessWidget { const Home({super.key}); @override /* build() This method is called whenever the state of the app changes. It is called again and again. */ Widget build(BuildContext context) { /* Scaffold() A Scaffold is like wrapper to different layouts like appbar, body, floatingActionButton etc. */ return Scaffold( appBar: AppBar( title: Text('My First App'), centerTitle: true, backgroundColor: Colors.red[600] ), body: Row( children: <Widget>[ Expanded( flex: 3, child: Image.asset('assets/images/2.jpg'), ), Expanded( flex: 3, child: Container( margin: EdgeInsets.all(10.0), padding: EdgeInsets.all(30.0), color: Colors.cyan, child: Text('1') ), ), Expanded( flex: 2, child: Container( margin: EdgeInsets.all(10.0), padding: EdgeInsets.all(30.0), color: Colors.pinkAccent, child: Text('2') ), ), Expanded( flex: 1, child: Container( margin: EdgeInsets.all(10.0), padding: EdgeInsets.all(30.0), color: Colors.amber, child: Text('3') ), ) ] ), floatingActionButton: FloatingActionButton( onPressed: () {}, backgroundColor: Colors.red[600], child: Text('Click') ) ); } }
0
mirrored_repositories/acdf_dw7_job_timer
mirrored_repositories/acdf_dw7_job_timer/lib/main.dart
import 'package:acdf_dw7_job_timer/app/app_module.dart'; import 'package:acdf_dw7_job_timer/app/app_widget.dart'; import 'package:acdf_dw7_job_timer/firebase_options.dart'; import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/material.dart'; import 'package:flutter_modular/flutter_modular.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform); runApp( ModularApp( module: AppModule(), child: const AppWidget(), ), ); }
0
mirrored_repositories/acdf_dw7_job_timer/lib
mirrored_repositories/acdf_dw7_job_timer/lib/app/app_widget.dart
import 'package:acdf_dw7_job_timer/app/core/ui/app_config_ui.dart'; import 'package:flutter/material.dart'; import 'package:flutter_modular/flutter_modular.dart'; import 'package:asuka/asuka.dart' as asuka; class AppWidget extends StatelessWidget { const AppWidget({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return MaterialApp.router( debugShowCheckedModeBanner: false, title: "Job Timer", builder: asuka.builder, theme: AppConfigUI.theme, routeInformationParser: Modular.routeInformationParser, routerDelegate: Modular.routerDelegate, ); } }
0
mirrored_repositories/acdf_dw7_job_timer/lib
mirrored_repositories/acdf_dw7_job_timer/lib/app/app_module.dart
import 'package:acdf_dw7_job_timer/app/core/database/database.dart'; import 'package:acdf_dw7_job_timer/app/core/database/database_impl.dart'; import 'package:acdf_dw7_job_timer/app/modules/home/home_module.dart'; import 'package:acdf_dw7_job_timer/app/modules/login/login_module.dart'; import 'package:acdf_dw7_job_timer/app/modules/project/project_module.dart'; import 'package:acdf_dw7_job_timer/app/modules/splash/splash_page.dart'; import 'package:acdf_dw7_job_timer/app/repositories/projects/project_repository.dart'; import 'package:acdf_dw7_job_timer/app/repositories/projects/project_repository_impl.dart'; import 'package:acdf_dw7_job_timer/app/services/auth/auth_service.dart'; import 'package:acdf_dw7_job_timer/app/services/auth/auth_service_impl.dart'; import 'package:acdf_dw7_job_timer/app/services/projects/project_service.dart'; import 'package:acdf_dw7_job_timer/app/services/projects/project_service_impl.dart'; import 'package:flutter_modular/flutter_modular.dart'; class AppModule extends Module { @override List<Bind<Object>> get binds => [ Bind.lazySingleton<AuthService>((i) => AuthServiceImpl()), Bind.lazySingleton<Database>((i) => DatabaseImpl()), Bind.lazySingleton<ProjectRepository>( (i) => ProjectRepositoryImpl(database: i())), Bind.lazySingleton<ProjectService>( (i) => ProjectServiceImpl(projectRepository: i())) ]; @override List<ModularRoute> get routes => [ ChildRoute('/', child: (context, args) => const SplashPage()), ModuleRoute('/login', module: LoginModule()), ModuleRoute('/home', module: HomeModule()), ModuleRoute('/project', module: ProjectModule()), ]; }
0
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules/project/project_module.dart
import 'package:acdf_dw7_job_timer/app/modules/project/register/controller/project_register_controller.dart'; import 'package:acdf_dw7_job_timer/app/modules/project/register/project_register_module.dart'; import 'package:flutter_modular/flutter_modular.dart'; import 'package:modular_bloc_bind/modular_bloc_bind.dart'; class ProjectModule extends Module { @override List<Bind<Object>> get binds => [ BlocBind.lazySingleton( (i) => ProjectRegisterController(projectService: i())) //AppModule ]; @override List<ModularRoute> get routes => [ ModuleRoute('/register', module: ProjectRegisterModule()), ]; }
0
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules/project
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules/project/register/project_register_page.dart
import 'package:acdf_dw7_job_timer/app/modules/project/register/controller/project_register_controller.dart'; import 'package:asuka/asuka.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:validatorless/validatorless.dart'; class ProjectRegisterPage extends StatefulWidget { final ProjectRegisterController controller; const ProjectRegisterPage({super.key, required this.controller}); @override State<ProjectRegisterPage> createState() => _ProjectRegisterPageState(); } class _ProjectRegisterPageState extends State<ProjectRegisterPage> { final _formKey = GlobalKey<FormState>(); final _nameEC = TextEditingController(); final _estimateEC = TextEditingController(); @override void dispose() { _nameEC.dispose(); _estimateEC.dispose(); super.dispose(); } @override Widget build(BuildContext context) { return BlocListener<ProjectRegisterController, ProjectRegisterStatus>( bloc: widget.controller, listener: (context, state) { switch (state) { case ProjectRegisterStatus.sucess: Navigator.pop(context); break; case ProjectRegisterStatus.fail: AsukaSnackbar.alert('Erro ao salvar projeto').show(); break; default: break; } }, child: Scaffold( backgroundColor: Colors.white, appBar: AppBar( title: Text( 'Adicionar novo projeto', style: TextStyle(color: Theme.of(context).primaryColor), ), centerTitle: true, backgroundColor: Colors.white, elevation: 0, iconTheme: IconThemeData(color: Theme.of(context).primaryColor), ), body: Form( key: _formKey, child: Padding( padding: const EdgeInsets.all(20.0), child: SingleChildScrollView( child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ TextFormField( controller: _nameEC, decoration: const InputDecoration( label: Text('Nome do Projeto'), ), validator: Validatorless.required( 'Obrigatório adicionar um nome'), ), const SizedBox( height: 20, ), TextFormField( controller: _estimateEC, decoration: const InputDecoration( label: Text('Estimativa de horas a gastar'), ), keyboardType: TextInputType.number, validator: Validatorless.multiple([ Validatorless.required( 'Obrigatório adicionar estimativa de horas'), Validatorless.number( 'Permitido adicionar somente números'), ]), ), const SizedBox( height: 20, ), BlocSelector<ProjectRegisterController, ProjectRegisterStatus, bool>( selector: ((state) => state == ProjectRegisterStatus.loading), bloc: widget.controller, builder: ((state, showLoading) { return Visibility( visible: showLoading, replacement: ElevatedButton( style: ElevatedButton.styleFrom( fixedSize: const Size(49, 49)), onPressed: () async { final formValidate = _formKey.currentState?.validate() ?? false; if (formValidate) { final name = _nameEC.text; final estimate = int.parse(_estimateEC.text); await widget.controller .register(name, estimate); } }, child: const Text('Adicionar'), ), child: const Center( child: CircularProgressIndicator.adaptive()), ); }), ), ], ), ), )), ), ); } }
0
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules/project
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules/project/register/project_register_module.dart
import 'package:acdf_dw7_job_timer/app/modules/project/register/controller/project_register_controller.dart'; import 'package:acdf_dw7_job_timer/app/modules/project/register/project_register_page.dart'; import 'package:flutter_modular/flutter_modular.dart'; import 'package:modular_bloc_bind/modular_bloc_bind.dart'; class ProjectRegisterModule extends Module { @override List<Bind<Object>> get binds => [ BlocBind.lazySingleton( (i) => ProjectRegisterController(projectService: i())) ]; @override List<ModularRoute> get routes => [ ChildRoute('/', child: ((context, args) => ProjectRegisterPage( controller: Modular.get(), ))), ]; }
0
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules/project/register
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules/project/register/controller/project_register_controller.dart
import 'dart:developer'; import 'package:acdf_dw7_job_timer/app/entities/project_status.dart'; import 'package:acdf_dw7_job_timer/app/services/projects/project_service.dart'; import 'package:acdf_dw7_job_timer/app/view_models/project_view_model.dart'; import 'package:bloc/bloc.dart'; part 'project_register_status.dart'; class ProjectRegisterController extends Cubit<ProjectRegisterStatus> { final ProjectService _projectService; ProjectRegisterController({required ProjectService projectService}) : _projectService = projectService, super(ProjectRegisterStatus.initial); Future<void> register(String name, int estimate) async { try { emit(ProjectRegisterStatus.loading); final project = ProjectViewModel( name: name, estimate: estimate, status: ProjectStatus.emAndamento, tasks: [], ); await _projectService.register(project); emit(ProjectRegisterStatus.sucess); } catch (e, s) { log('Erro ao salvar projeto', error: e, stackTrace: s); emit(ProjectRegisterStatus.fail); } } }
0
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules/project/register
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules/project/register/controller/project_register_status.dart
part of 'project_register_controller.dart'; enum ProjectRegisterStatus { initial, loading, sucess, fail; }
0
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules/login/login_module.dart
import 'package:acdf_dw7_job_timer/app/modules/login/controller/login_controller.dart'; import 'package:acdf_dw7_job_timer/app/modules/login/login_page.dart'; import 'package:flutter_modular/flutter_modular.dart'; import 'package:modular_bloc_bind/modular_bloc_bind.dart'; class LoginModule extends Module { @override List<Bind<Object>> get binds => [BlocBind.lazySingleton((i) => LoginController(authService: i()))]; @override List<ModularRoute> get routes => [ ChildRoute('/', child: ((context, args) => LoginPage( controller: Modular.get(), ))) ]; }
0
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules/login/login_page.dart
import 'package:acdf_dw7_job_timer/app/modules/login/controller/login_controller.dart'; import 'package:asuka/snackbars/asuka_snack_bar.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; class LoginPage extends StatelessWidget { final LoginController controller; const LoginPage({super.key, required this.controller}); @override Widget build(BuildContext context) { final screenSize = MediaQuery.of(context).size; return BlocListener<LoginController, LoginState>( bloc: controller, listenWhen: (previous, current) => previous.status != current.status, listener: (context, state) { if (state.status == LoginStatus.failure) { final message = state.errorMessage ?? 'Erro ao realizar login, tente novamente'; AsukaSnackbar.alert(message).show(); } }, child: Scaffold( body: Container( decoration: const BoxDecoration( gradient: LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [ Color(0XFF0092B9), Color(0XFF016782), ], ), ), child: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Image.asset('assets/images/logo.png'), SizedBox( height: screenSize.height * .1, ), SizedBox( height: 49, width: screenSize.width * .8, child: ElevatedButton( onPressed: () { controller.sigIn(); }, style: ElevatedButton.styleFrom(primary: Colors.grey.shade300), child: Image.asset('assets/images/google.png'), ), ), BlocSelector<LoginController, LoginState, bool>( bloc: controller, selector: (state) => state.status == LoginStatus.loading, builder: (context, show) { return Visibility( visible: show, child: const Padding( padding: EdgeInsets.only(top: 15.0), child: Center( child: CircularProgressIndicator.adaptive( backgroundColor: Colors.white, ), ), ), ); }) ], ), ), ), ), ); } }
0
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules/login
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules/login/controller/login_state.dart
part of 'login_controller.dart'; enum LoginStatus { initial, loading, failure } class LoginState extends Equatable { final LoginStatus status; final String? errorMessage; const LoginState._({required this.status, this.errorMessage}); const LoginState.initial() : this._(status: LoginStatus.initial); @override List<Object?> get props => [status, errorMessage]; LoginState copyWith({ LoginStatus? status, String? errorMessage, }) { return LoginState._( status: status ?? this.status, errorMessage: errorMessage ?? this.errorMessage); } }
0
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules/login
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules/login/controller/login_controller.dart
import 'dart:developer'; import 'package:acdf_dw7_job_timer/app/services/auth/auth_service.dart'; import 'package:bloc/bloc.dart'; import 'package:equatable/equatable.dart'; part 'login_state.dart'; class LoginController extends Cubit<LoginState> { final AuthService _authService; LoginController({required AuthService authService}) : _authService = authService, super(const LoginState.initial()); Future<void> sigIn() async { try { emit(state.copyWith(status: LoginStatus.loading)); await _authService.signIn(); } catch (e, s) { log('erro ao realizar login', error: e, stackTrace: s); emit( state.copyWith( status: LoginStatus.failure, errorMessage: 'Erro ao realizar login', ), ); } } }
0
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules/home/home_page.dart
import 'package:acdf_dw7_job_timer/app/modules/home/controller/home_controller.dart'; import 'package:acdf_dw7_job_timer/app/modules/home/widgets/header_projects_menu.dart'; import 'package:acdf_dw7_job_timer/app/view_models/project_view_model.dart'; import 'package:asuka/snackbars/asuka_snack_bar.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; class HomePage extends StatelessWidget { final HomeController controller; const HomePage({super.key, required this.controller}); @override Widget build(BuildContext context) { return BlocListener<HomeController, HomeState>( bloc: controller, listener: ((context, state) { if (state.status == HomeStatus.fail) { AsukaSnackbar.alert('Erro ao buscar projetos no banco de dados') .show(); } }), child: Scaffold( drawer: const Drawer( child: SafeArea( child: ListTile(), ), ), body: SafeArea( child: CustomScrollView( slivers: [ const SliverAppBar( title: Text('Projetos'), centerTitle: true, expandedHeight: 100, toolbarHeight: 100, shape: RoundedRectangleBorder( borderRadius: BorderRadius.vertical(bottom: Radius.circular(15))), ), SliverPersistentHeader( delegate: HeaderProjectsMenu(), pinned: true, ), BlocSelector<HomeController, HomeState, bool>( bloc: controller, selector: (state) => state.status == HomeStatus.loading, builder: (context, showloading) { return SliverVisibility( visible: showloading, sliver: const SliverToBoxAdapter( child: SizedBox( height: 50, child: Center(child: CircularProgressIndicator.adaptive()), ), ), ); }, ), BlocSelector<HomeController, HomeState, List<ProjectViewModel>>( bloc: controller, selector: (state) => state.projects, builder: (context, projects) { return SliverList( delegate: SliverChildListDelegate(projects .map( (project) => ListTile( title: Text(project.name), subtitle: Text('${project.estimate}h'), ), ) .toList()), ); }, ), ], ), ), ), ); } }
0
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules/home/home_module.dart
import 'package:acdf_dw7_job_timer/app/modules/home/controller/home_controller.dart'; import 'package:acdf_dw7_job_timer/app/modules/home/home_page.dart'; import 'package:flutter_modular/flutter_modular.dart'; import 'package:modular_bloc_bind/modular_bloc_bind.dart'; class HomeModule extends Module { @override List<Bind<Object>> get binds => [BlocBind.lazySingleton((i) => HomeController(projectService: (i())))]; @override List<ModularRoute> get routes => [ ChildRoute('/', child: (context, args) => HomePage(controller: Modular.get()..loadProjects())), ]; }
0
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules/home
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules/home/widgets/header_projects_menu.dart
import 'package:acdf_dw7_job_timer/app/entities/project_status.dart'; import 'package:flutter/material.dart'; import 'package:flutter_modular/flutter_modular.dart'; class HeaderProjectsMenu extends SliverPersistentHeaderDelegate { @override Widget build( BuildContext context, double shrinkOffset, bool overlapsContent) { return LayoutBuilder( builder: (context, constraints) { return Container( height: constraints.maxHeight, padding: const EdgeInsets.all(10), color: Colors.white, child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ SizedBox( width: constraints.maxWidth * .5, child: DropdownButtonFormField<ProjectStatus>( value: ProjectStatus.emAndamento, borderRadius: BorderRadius.circular(20), decoration: InputDecoration( border: OutlineInputBorder( borderRadius: BorderRadius.circular(20), ), contentPadding: const EdgeInsets.all(8), isCollapsed: true, ), items: ProjectStatus.values .map( (e) => DropdownMenuItem( value: e, child: Text(e.label), ), ) .toList(), onChanged: (value) {}, ), ), SizedBox( width: constraints.maxWidth * .4, child: ElevatedButton.icon( onPressed: () { Modular.to.pushNamed('/project/register'); }, icon: const Icon(Icons.add), label: const Text('Adicionar Projeto'), ), ), ], ), ); }, ); } @override double get maxExtent => 80; @override double get minExtent => 80; @override bool shouldRebuild(covariant SliverPersistentHeaderDelegate oldDelegate) { return true; } }
0
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules/home
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules/home/controller/home_state.dart
part of 'home_controller.dart'; enum HomeStatus { initial, loading, complete, fail; } class HomeState extends Equatable { final List<ProjectViewModel> projects; final HomeStatus status; final ProjectStatus projectFilter; const HomeState._({ required this.projects, required this.status, required this.projectFilter, }); HomeState.initial() : this._( projects: [], status: HomeStatus.initial, projectFilter: ProjectStatus.emAndamento, ); @override List<Object?> get props => [projects, status, projectFilter]; HomeState copyWith({ final List<ProjectViewModel>? projects, final HomeStatus? status, final ProjectStatus? projectFilter, }) { return HomeState._( projects: projects ?? this.projects, status: status ?? this.status, projectFilter: projectFilter ?? this.projectFilter, ); } }
0
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules/home
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules/home/controller/home_controller.dart
import 'dart:developer'; import 'package:acdf_dw7_job_timer/app/entities/project_status.dart'; import 'package:acdf_dw7_job_timer/app/services/projects/project_service.dart'; import 'package:acdf_dw7_job_timer/app/view_models/project_view_model.dart'; import 'package:equatable/equatable.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; part 'home_state.dart'; class HomeController extends Cubit<HomeState> { ProjectService _projectService; HomeController({required ProjectService projectService}) : _projectService = projectService, super(HomeState.initial()); Future<void> loadProjects() async { try { emit(state.copyWith(status: HomeStatus.loading)); final projects = await _projectService.findByStatus(state.projectFilter); emit(state.copyWith(status: HomeStatus.complete, projects: projects)); } catch (e, s) { log('Erro ao buscar projetos nno banco de dados', error: e, stackTrace: s); emit(state.copyWith(status: HomeStatus.fail)); } } }
0
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules
mirrored_repositories/acdf_dw7_job_timer/lib/app/modules/splash/splash_page.dart
import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/material.dart'; import 'package:flutter_modular/flutter_modular.dart'; class SplashPage extends StatefulWidget { const SplashPage({super.key}); @override State<SplashPage> createState() => _SplashPageState(); } class _SplashPageState extends State<SplashPage> { @override void initState() { super.initState(); const Duration(milliseconds: 300); Future.delayed( const Duration(milliseconds: 2000), () { FirebaseAuth.instance.authStateChanges().listen( (User? user) { if (user == null) { Modular.to.navigate('/login'); } else { Modular.to.navigate('/home'); } }, ); }, ); } @override Widget build(BuildContext context) { return Container( decoration: const BoxDecoration( gradient: LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [ Color(0XFF0092B9), Color(0XFF016782), ], ), ), child: Center( child: Image.asset('assets/images/logo.png'), ), ); } }
0
mirrored_repositories/acdf_dw7_job_timer/lib/app
mirrored_repositories/acdf_dw7_job_timer/lib/app/entities/project_status.dart
enum ProjectStatus { emAndamento(label: 'Em andamento'), finalizado(label: 'Finalizado'); final String label; const ProjectStatus({required this.label}); }
0
mirrored_repositories/acdf_dw7_job_timer/lib/app
mirrored_repositories/acdf_dw7_job_timer/lib/app/entities/project_task.dart
import 'package:isar/isar.dart'; part 'project_task.g.dart'; @Collection() class ProjectTask { @Id() int? id; late String name; late int duration; late int estimate; late DateTime date = DateTime.now(); }
0
mirrored_repositories/acdf_dw7_job_timer/lib/app
mirrored_repositories/acdf_dw7_job_timer/lib/app/entities/project.g.dart
// GENERATED CODE - DO NOT MODIFY BY HAND part of 'project.dart'; // ************************************************************************** // IsarCollectionGenerator // ************************************************************************** // ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, unused_local_variable, no_leading_underscores_for_local_identifiers extension GetProjectCollection on Isar { IsarCollection<Project> get projects => getCollection(); } const ProjectSchema = CollectionSchema( name: 'Project', schema: '{"name":"Project","idName":"id","properties":[{"name":"estimate","type":"Long"},{"name":"name","type":"String"},{"name":"status","type":"Long"}],"indexes":[],"links":[{"name":"tasks","target":"ProjectTask"}]}', idName: 'id', propertyIds: {'estimate': 0, 'name': 1, 'status': 2}, listProperties: {}, indexIds: {}, indexValueTypes: {}, linkIds: {'tasks': 0}, backlinkLinkNames: {}, getId: _projectGetId, setId: _projectSetId, getLinks: _projectGetLinks, attachLinks: _projectAttachLinks, serializeNative: _projectSerializeNative, deserializeNative: _projectDeserializeNative, deserializePropNative: _projectDeserializePropNative, serializeWeb: _projectSerializeWeb, deserializeWeb: _projectDeserializeWeb, deserializePropWeb: _projectDeserializePropWeb, version: 4, ); int? _projectGetId(Project object) { if (object.id == Isar.autoIncrement) { return null; } else { return object.id; } } void _projectSetId(Project object, int id) { object.id = id; } List<IsarLinkBase> _projectGetLinks(Project object) { return [object.tasks]; } const _projectProjectStatusConverter = ProjectStatusConverter(); void _projectSerializeNative( IsarCollection<Project> collection, IsarCObject cObj, Project object, int staticSize, List<int> offsets, AdapterAlloc alloc) { var dynamicSize = 0; final value0 = object.estimate; final _estimate = value0; final value1 = object.name; final _name = IsarBinaryWriter.utf8Encoder.convert(value1); dynamicSize += (_name.length) as int; final value2 = _projectProjectStatusConverter.toIsar(object.status); final _status = value2; final size = staticSize + dynamicSize; cObj.buffer = alloc(size); cObj.buffer_length = size; final buffer = IsarNative.bufAsBytes(cObj.buffer, size); final writer = IsarBinaryWriter(buffer, staticSize); writer.writeLong(offsets[0], _estimate); writer.writeBytes(offsets[1], _name); writer.writeLong(offsets[2], _status); } Project _projectDeserializeNative(IsarCollection<Project> collection, int id, IsarBinaryReader reader, List<int> offsets) { final object = Project(); object.estimate = reader.readLong(offsets[0]); object.id = id; object.name = reader.readString(offsets[1]); object.status = _projectProjectStatusConverter.fromIsar(reader.readLong(offsets[2])); _projectAttachLinks(collection, id, object); return object; } P _projectDeserializePropNative<P>( int id, IsarBinaryReader reader, int propertyIndex, int offset) { switch (propertyIndex) { case -1: return id as P; case 0: return (reader.readLong(offset)) as P; case 1: return (reader.readString(offset)) as P; case 2: return (_projectProjectStatusConverter.fromIsar(reader.readLong(offset))) as P; default: throw 'Illegal propertyIndex'; } } dynamic _projectSerializeWeb( IsarCollection<Project> collection, Project object) { final jsObj = IsarNative.newJsObject(); IsarNative.jsObjectSet(jsObj, 'estimate', object.estimate); IsarNative.jsObjectSet(jsObj, 'id', object.id); IsarNative.jsObjectSet(jsObj, 'name', object.name); IsarNative.jsObjectSet( jsObj, 'status', _projectProjectStatusConverter.toIsar(object.status)); return jsObj; } Project _projectDeserializeWeb( IsarCollection<Project> collection, dynamic jsObj) { final object = Project(); object.estimate = IsarNative.jsObjectGet(jsObj, 'estimate') ?? double.negativeInfinity; object.id = IsarNative.jsObjectGet(jsObj, 'id'); object.name = IsarNative.jsObjectGet(jsObj, 'name') ?? ''; object.status = _projectProjectStatusConverter.fromIsar( IsarNative.jsObjectGet(jsObj, 'status') ?? double.negativeInfinity); _projectAttachLinks(collection, IsarNative.jsObjectGet(jsObj, 'id'), object); return object; } P _projectDeserializePropWeb<P>(Object jsObj, String propertyName) { switch (propertyName) { case 'estimate': return (IsarNative.jsObjectGet(jsObj, 'estimate') ?? double.negativeInfinity) as P; case 'id': return (IsarNative.jsObjectGet(jsObj, 'id')) as P; case 'name': return (IsarNative.jsObjectGet(jsObj, 'name') ?? '') as P; case 'status': return (_projectProjectStatusConverter.fromIsar( IsarNative.jsObjectGet(jsObj, 'status') ?? double.negativeInfinity)) as P; default: throw 'Illegal propertyName'; } } void _projectAttachLinks(IsarCollection col, int id, Project object) { object.tasks.attach(col, col.isar.projectTasks, 'tasks', id); } extension ProjectQueryWhereSort on QueryBuilder<Project, Project, QWhere> { QueryBuilder<Project, Project, QAfterWhere> anyId() { return addWhereClauseInternal(const IdWhereClause.any()); } } extension ProjectQueryWhere on QueryBuilder<Project, Project, QWhereClause> { QueryBuilder<Project, Project, QAfterWhereClause> idEqualTo(int id) { return addWhereClauseInternal(IdWhereClause.between( lower: id, includeLower: true, upper: id, includeUpper: true, )); } QueryBuilder<Project, Project, QAfterWhereClause> idNotEqualTo(int id) { if (whereSortInternal == Sort.asc) { return addWhereClauseInternal( IdWhereClause.lessThan(upper: id, includeUpper: false), ).addWhereClauseInternal( IdWhereClause.greaterThan(lower: id, includeLower: false), ); } else { return addWhereClauseInternal( IdWhereClause.greaterThan(lower: id, includeLower: false), ).addWhereClauseInternal( IdWhereClause.lessThan(upper: id, includeUpper: false), ); } } QueryBuilder<Project, Project, QAfterWhereClause> idGreaterThan(int id, {bool include = false}) { return addWhereClauseInternal( IdWhereClause.greaterThan(lower: id, includeLower: include), ); } QueryBuilder<Project, Project, QAfterWhereClause> idLessThan(int id, {bool include = false}) { return addWhereClauseInternal( IdWhereClause.lessThan(upper: id, includeUpper: include), ); } QueryBuilder<Project, Project, QAfterWhereClause> idBetween( int lowerId, int upperId, { bool includeLower = true, bool includeUpper = true, }) { return addWhereClauseInternal(IdWhereClause.between( lower: lowerId, includeLower: includeLower, upper: upperId, includeUpper: includeUpper, )); } } extension ProjectQueryFilter on QueryBuilder<Project, Project, QFilterCondition> { QueryBuilder<Project, Project, QAfterFilterCondition> estimateEqualTo( int value) { return addFilterConditionInternal(FilterCondition( type: ConditionType.eq, property: 'estimate', value: value, )); } QueryBuilder<Project, Project, QAfterFilterCondition> estimateGreaterThan( int value, { bool include = false, }) { return addFilterConditionInternal(FilterCondition( type: ConditionType.gt, include: include, property: 'estimate', value: value, )); } QueryBuilder<Project, Project, QAfterFilterCondition> estimateLessThan( int value, { bool include = false, }) { return addFilterConditionInternal(FilterCondition( type: ConditionType.lt, include: include, property: 'estimate', value: value, )); } QueryBuilder<Project, Project, QAfterFilterCondition> estimateBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return addFilterConditionInternal(FilterCondition.between( property: 'estimate', lower: lower, includeLower: includeLower, upper: upper, includeUpper: includeUpper, )); } QueryBuilder<Project, Project, QAfterFilterCondition> idIsNull() { return addFilterConditionInternal(FilterCondition( type: ConditionType.isNull, property: 'id', value: null, )); } QueryBuilder<Project, Project, QAfterFilterCondition> idEqualTo(int value) { return addFilterConditionInternal(FilterCondition( type: ConditionType.eq, property: 'id', value: value, )); } QueryBuilder<Project, Project, QAfterFilterCondition> idGreaterThan( int value, { bool include = false, }) { return addFilterConditionInternal(FilterCondition( type: ConditionType.gt, include: include, property: 'id', value: value, )); } QueryBuilder<Project, Project, QAfterFilterCondition> idLessThan( int value, { bool include = false, }) { return addFilterConditionInternal(FilterCondition( type: ConditionType.lt, include: include, property: 'id', value: value, )); } QueryBuilder<Project, Project, QAfterFilterCondition> idBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return addFilterConditionInternal(FilterCondition.between( property: 'id', lower: lower, includeLower: includeLower, upper: upper, includeUpper: includeUpper, )); } QueryBuilder<Project, Project, QAfterFilterCondition> nameEqualTo( String value, { bool caseSensitive = true, }) { return addFilterConditionInternal(FilterCondition( type: ConditionType.eq, property: 'name', value: value, caseSensitive: caseSensitive, )); } QueryBuilder<Project, Project, QAfterFilterCondition> nameGreaterThan( String value, { bool caseSensitive = true, bool include = false, }) { return addFilterConditionInternal(FilterCondition( type: ConditionType.gt, include: include, property: 'name', value: value, caseSensitive: caseSensitive, )); } QueryBuilder<Project, Project, QAfterFilterCondition> nameLessThan( String value, { bool caseSensitive = true, bool include = false, }) { return addFilterConditionInternal(FilterCondition( type: ConditionType.lt, include: include, property: 'name', value: value, caseSensitive: caseSensitive, )); } QueryBuilder<Project, Project, QAfterFilterCondition> nameBetween( String lower, String upper, { bool caseSensitive = true, bool includeLower = true, bool includeUpper = true, }) { return addFilterConditionInternal(FilterCondition.between( property: 'name', lower: lower, includeLower: includeLower, upper: upper, includeUpper: includeUpper, caseSensitive: caseSensitive, )); } QueryBuilder<Project, Project, QAfterFilterCondition> nameStartsWith( String value, { bool caseSensitive = true, }) { return addFilterConditionInternal(FilterCondition( type: ConditionType.startsWith, property: 'name', value: value, caseSensitive: caseSensitive, )); } QueryBuilder<Project, Project, QAfterFilterCondition> nameEndsWith( String value, { bool caseSensitive = true, }) { return addFilterConditionInternal(FilterCondition( type: ConditionType.endsWith, property: 'name', value: value, caseSensitive: caseSensitive, )); } QueryBuilder<Project, Project, QAfterFilterCondition> nameContains( String value, {bool caseSensitive = true}) { return addFilterConditionInternal(FilterCondition( type: ConditionType.contains, property: 'name', value: value, caseSensitive: caseSensitive, )); } QueryBuilder<Project, Project, QAfterFilterCondition> nameMatches( String pattern, {bool caseSensitive = true}) { return addFilterConditionInternal(FilterCondition( type: ConditionType.matches, property: 'name', value: pattern, caseSensitive: caseSensitive, )); } QueryBuilder<Project, Project, QAfterFilterCondition> statusEqualTo( ProjectStatus value) { return addFilterConditionInternal(FilterCondition( type: ConditionType.eq, property: 'status', value: _projectProjectStatusConverter.toIsar(value), )); } QueryBuilder<Project, Project, QAfterFilterCondition> statusGreaterThan( ProjectStatus value, { bool include = false, }) { return addFilterConditionInternal(FilterCondition( type: ConditionType.gt, include: include, property: 'status', value: _projectProjectStatusConverter.toIsar(value), )); } QueryBuilder<Project, Project, QAfterFilterCondition> statusLessThan( ProjectStatus value, { bool include = false, }) { return addFilterConditionInternal(FilterCondition( type: ConditionType.lt, include: include, property: 'status', value: _projectProjectStatusConverter.toIsar(value), )); } QueryBuilder<Project, Project, QAfterFilterCondition> statusBetween( ProjectStatus lower, ProjectStatus upper, { bool includeLower = true, bool includeUpper = true, }) { return addFilterConditionInternal(FilterCondition.between( property: 'status', lower: _projectProjectStatusConverter.toIsar(lower), includeLower: includeLower, upper: _projectProjectStatusConverter.toIsar(upper), includeUpper: includeUpper, )); } } extension ProjectQueryLinks on QueryBuilder<Project, Project, QFilterCondition> { QueryBuilder<Project, Project, QAfterFilterCondition> tasks( FilterQuery<ProjectTask> q) { return linkInternal( isar.projectTasks, q, 'tasks', ); } } extension ProjectQueryWhereSortBy on QueryBuilder<Project, Project, QSortBy> { QueryBuilder<Project, Project, QAfterSortBy> sortByEstimate() { return addSortByInternal('estimate', Sort.asc); } QueryBuilder<Project, Project, QAfterSortBy> sortByEstimateDesc() { return addSortByInternal('estimate', Sort.desc); } QueryBuilder<Project, Project, QAfterSortBy> sortById() { return addSortByInternal('id', Sort.asc); } QueryBuilder<Project, Project, QAfterSortBy> sortByIdDesc() { return addSortByInternal('id', Sort.desc); } QueryBuilder<Project, Project, QAfterSortBy> sortByName() { return addSortByInternal('name', Sort.asc); } QueryBuilder<Project, Project, QAfterSortBy> sortByNameDesc() { return addSortByInternal('name', Sort.desc); } QueryBuilder<Project, Project, QAfterSortBy> sortByStatus() { return addSortByInternal('status', Sort.asc); } QueryBuilder<Project, Project, QAfterSortBy> sortByStatusDesc() { return addSortByInternal('status', Sort.desc); } } extension ProjectQueryWhereSortThenBy on QueryBuilder<Project, Project, QSortThenBy> { QueryBuilder<Project, Project, QAfterSortBy> thenByEstimate() { return addSortByInternal('estimate', Sort.asc); } QueryBuilder<Project, Project, QAfterSortBy> thenByEstimateDesc() { return addSortByInternal('estimate', Sort.desc); } QueryBuilder<Project, Project, QAfterSortBy> thenById() { return addSortByInternal('id', Sort.asc); } QueryBuilder<Project, Project, QAfterSortBy> thenByIdDesc() { return addSortByInternal('id', Sort.desc); } QueryBuilder<Project, Project, QAfterSortBy> thenByName() { return addSortByInternal('name', Sort.asc); } QueryBuilder<Project, Project, QAfterSortBy> thenByNameDesc() { return addSortByInternal('name', Sort.desc); } QueryBuilder<Project, Project, QAfterSortBy> thenByStatus() { return addSortByInternal('status', Sort.asc); } QueryBuilder<Project, Project, QAfterSortBy> thenByStatusDesc() { return addSortByInternal('status', Sort.desc); } } extension ProjectQueryWhereDistinct on QueryBuilder<Project, Project, QDistinct> { QueryBuilder<Project, Project, QDistinct> distinctByEstimate() { return addDistinctByInternal('estimate'); } QueryBuilder<Project, Project, QDistinct> distinctById() { return addDistinctByInternal('id'); } QueryBuilder<Project, Project, QDistinct> distinctByName( {bool caseSensitive = true}) { return addDistinctByInternal('name', caseSensitive: caseSensitive); } QueryBuilder<Project, Project, QDistinct> distinctByStatus() { return addDistinctByInternal('status'); } } extension ProjectQueryProperty on QueryBuilder<Project, Project, QQueryProperty> { QueryBuilder<Project, int, QQueryOperations> estimateProperty() { return addPropertyNameInternal('estimate'); } QueryBuilder<Project, int?, QQueryOperations> idProperty() { return addPropertyNameInternal('id'); } QueryBuilder<Project, String, QQueryOperations> nameProperty() { return addPropertyNameInternal('name'); } QueryBuilder<Project, ProjectStatus, QQueryOperations> statusProperty() { return addPropertyNameInternal('status'); } }
0
mirrored_repositories/acdf_dw7_job_timer/lib/app
mirrored_repositories/acdf_dw7_job_timer/lib/app/entities/project_task.g.dart
// GENERATED CODE - DO NOT MODIFY BY HAND part of 'project_task.dart'; // ************************************************************************** // IsarCollectionGenerator // ************************************************************************** // ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, unused_local_variable, no_leading_underscores_for_local_identifiers extension GetProjectTaskCollection on Isar { IsarCollection<ProjectTask> get projectTasks => getCollection(); } const ProjectTaskSchema = CollectionSchema( name: 'ProjectTask', schema: '{"name":"ProjectTask","idName":"id","properties":[{"name":"date","type":"Long"},{"name":"duration","type":"Long"},{"name":"estimate","type":"Long"},{"name":"name","type":"String"}],"indexes":[],"links":[]}', idName: 'id', propertyIds: {'date': 0, 'duration': 1, 'estimate': 2, 'name': 3}, listProperties: {}, indexIds: {}, indexValueTypes: {}, linkIds: {}, backlinkLinkNames: {}, getId: _projectTaskGetId, setId: _projectTaskSetId, getLinks: _projectTaskGetLinks, attachLinks: _projectTaskAttachLinks, serializeNative: _projectTaskSerializeNative, deserializeNative: _projectTaskDeserializeNative, deserializePropNative: _projectTaskDeserializePropNative, serializeWeb: _projectTaskSerializeWeb, deserializeWeb: _projectTaskDeserializeWeb, deserializePropWeb: _projectTaskDeserializePropWeb, version: 4, ); int? _projectTaskGetId(ProjectTask object) { if (object.id == Isar.autoIncrement) { return null; } else { return object.id; } } void _projectTaskSetId(ProjectTask object, int id) { object.id = id; } List<IsarLinkBase> _projectTaskGetLinks(ProjectTask object) { return []; } void _projectTaskSerializeNative( IsarCollection<ProjectTask> collection, IsarCObject cObj, ProjectTask object, int staticSize, List<int> offsets, AdapterAlloc alloc) { var dynamicSize = 0; final value0 = object.date; final _date = value0; final value1 = object.duration; final _duration = value1; final value2 = object.estimate; final _estimate = value2; final value3 = object.name; final _name = IsarBinaryWriter.utf8Encoder.convert(value3); dynamicSize += (_name.length) as int; final size = staticSize + dynamicSize; cObj.buffer = alloc(size); cObj.buffer_length = size; final buffer = IsarNative.bufAsBytes(cObj.buffer, size); final writer = IsarBinaryWriter(buffer, staticSize); writer.writeDateTime(offsets[0], _date); writer.writeLong(offsets[1], _duration); writer.writeLong(offsets[2], _estimate); writer.writeBytes(offsets[3], _name); } ProjectTask _projectTaskDeserializeNative( IsarCollection<ProjectTask> collection, int id, IsarBinaryReader reader, List<int> offsets) { final object = ProjectTask(); object.date = reader.readDateTime(offsets[0]); object.duration = reader.readLong(offsets[1]); object.estimate = reader.readLong(offsets[2]); object.id = id; object.name = reader.readString(offsets[3]); return object; } P _projectTaskDeserializePropNative<P>( int id, IsarBinaryReader reader, int propertyIndex, int offset) { switch (propertyIndex) { case -1: return id as P; case 0: return (reader.readDateTime(offset)) as P; case 1: return (reader.readLong(offset)) as P; case 2: return (reader.readLong(offset)) as P; case 3: return (reader.readString(offset)) as P; default: throw 'Illegal propertyIndex'; } } dynamic _projectTaskSerializeWeb( IsarCollection<ProjectTask> collection, ProjectTask object) { final jsObj = IsarNative.newJsObject(); IsarNative.jsObjectSet( jsObj, 'date', object.date.toUtc().millisecondsSinceEpoch); IsarNative.jsObjectSet(jsObj, 'duration', object.duration); IsarNative.jsObjectSet(jsObj, 'estimate', object.estimate); IsarNative.jsObjectSet(jsObj, 'id', object.id); IsarNative.jsObjectSet(jsObj, 'name', object.name); return jsObj; } ProjectTask _projectTaskDeserializeWeb( IsarCollection<ProjectTask> collection, dynamic jsObj) { final object = ProjectTask(); object.date = IsarNative.jsObjectGet(jsObj, 'date') != null ? DateTime.fromMillisecondsSinceEpoch( IsarNative.jsObjectGet(jsObj, 'date'), isUtc: true) .toLocal() : DateTime.fromMillisecondsSinceEpoch(0); object.duration = IsarNative.jsObjectGet(jsObj, 'duration') ?? double.negativeInfinity; object.estimate = IsarNative.jsObjectGet(jsObj, 'estimate') ?? double.negativeInfinity; object.id = IsarNative.jsObjectGet(jsObj, 'id'); object.name = IsarNative.jsObjectGet(jsObj, 'name') ?? ''; return object; } P _projectTaskDeserializePropWeb<P>(Object jsObj, String propertyName) { switch (propertyName) { case 'date': return (IsarNative.jsObjectGet(jsObj, 'date') != null ? DateTime.fromMillisecondsSinceEpoch( IsarNative.jsObjectGet(jsObj, 'date'), isUtc: true) .toLocal() : DateTime.fromMillisecondsSinceEpoch(0)) as P; case 'duration': return (IsarNative.jsObjectGet(jsObj, 'duration') ?? double.negativeInfinity) as P; case 'estimate': return (IsarNative.jsObjectGet(jsObj, 'estimate') ?? double.negativeInfinity) as P; case 'id': return (IsarNative.jsObjectGet(jsObj, 'id')) as P; case 'name': return (IsarNative.jsObjectGet(jsObj, 'name') ?? '') as P; default: throw 'Illegal propertyName'; } } void _projectTaskAttachLinks(IsarCollection col, int id, ProjectTask object) {} extension ProjectTaskQueryWhereSort on QueryBuilder<ProjectTask, ProjectTask, QWhere> { QueryBuilder<ProjectTask, ProjectTask, QAfterWhere> anyId() { return addWhereClauseInternal(const IdWhereClause.any()); } } extension ProjectTaskQueryWhere on QueryBuilder<ProjectTask, ProjectTask, QWhereClause> { QueryBuilder<ProjectTask, ProjectTask, QAfterWhereClause> idEqualTo(int id) { return addWhereClauseInternal(IdWhereClause.between( lower: id, includeLower: true, upper: id, includeUpper: true, )); } QueryBuilder<ProjectTask, ProjectTask, QAfterWhereClause> idNotEqualTo( int id) { if (whereSortInternal == Sort.asc) { return addWhereClauseInternal( IdWhereClause.lessThan(upper: id, includeUpper: false), ).addWhereClauseInternal( IdWhereClause.greaterThan(lower: id, includeLower: false), ); } else { return addWhereClauseInternal( IdWhereClause.greaterThan(lower: id, includeLower: false), ).addWhereClauseInternal( IdWhereClause.lessThan(upper: id, includeUpper: false), ); } } QueryBuilder<ProjectTask, ProjectTask, QAfterWhereClause> idGreaterThan( int id, {bool include = false}) { return addWhereClauseInternal( IdWhereClause.greaterThan(lower: id, includeLower: include), ); } QueryBuilder<ProjectTask, ProjectTask, QAfterWhereClause> idLessThan(int id, {bool include = false}) { return addWhereClauseInternal( IdWhereClause.lessThan(upper: id, includeUpper: include), ); } QueryBuilder<ProjectTask, ProjectTask, QAfterWhereClause> idBetween( int lowerId, int upperId, { bool includeLower = true, bool includeUpper = true, }) { return addWhereClauseInternal(IdWhereClause.between( lower: lowerId, includeLower: includeLower, upper: upperId, includeUpper: includeUpper, )); } } extension ProjectTaskQueryFilter on QueryBuilder<ProjectTask, ProjectTask, QFilterCondition> { QueryBuilder<ProjectTask, ProjectTask, QAfterFilterCondition> dateEqualTo( DateTime value) { return addFilterConditionInternal(FilterCondition( type: ConditionType.eq, property: 'date', value: value, )); } QueryBuilder<ProjectTask, ProjectTask, QAfterFilterCondition> dateGreaterThan( DateTime value, { bool include = false, }) { return addFilterConditionInternal(FilterCondition( type: ConditionType.gt, include: include, property: 'date', value: value, )); } QueryBuilder<ProjectTask, ProjectTask, QAfterFilterCondition> dateLessThan( DateTime value, { bool include = false, }) { return addFilterConditionInternal(FilterCondition( type: ConditionType.lt, include: include, property: 'date', value: value, )); } QueryBuilder<ProjectTask, ProjectTask, QAfterFilterCondition> dateBetween( DateTime lower, DateTime upper, { bool includeLower = true, bool includeUpper = true, }) { return addFilterConditionInternal(FilterCondition.between( property: 'date', lower: lower, includeLower: includeLower, upper: upper, includeUpper: includeUpper, )); } QueryBuilder<ProjectTask, ProjectTask, QAfterFilterCondition> durationEqualTo( int value) { return addFilterConditionInternal(FilterCondition( type: ConditionType.eq, property: 'duration', value: value, )); } QueryBuilder<ProjectTask, ProjectTask, QAfterFilterCondition> durationGreaterThan( int value, { bool include = false, }) { return addFilterConditionInternal(FilterCondition( type: ConditionType.gt, include: include, property: 'duration', value: value, )); } QueryBuilder<ProjectTask, ProjectTask, QAfterFilterCondition> durationLessThan( int value, { bool include = false, }) { return addFilterConditionInternal(FilterCondition( type: ConditionType.lt, include: include, property: 'duration', value: value, )); } QueryBuilder<ProjectTask, ProjectTask, QAfterFilterCondition> durationBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return addFilterConditionInternal(FilterCondition.between( property: 'duration', lower: lower, includeLower: includeLower, upper: upper, includeUpper: includeUpper, )); } QueryBuilder<ProjectTask, ProjectTask, QAfterFilterCondition> estimateEqualTo( int value) { return addFilterConditionInternal(FilterCondition( type: ConditionType.eq, property: 'estimate', value: value, )); } QueryBuilder<ProjectTask, ProjectTask, QAfterFilterCondition> estimateGreaterThan( int value, { bool include = false, }) { return addFilterConditionInternal(FilterCondition( type: ConditionType.gt, include: include, property: 'estimate', value: value, )); } QueryBuilder<ProjectTask, ProjectTask, QAfterFilterCondition> estimateLessThan( int value, { bool include = false, }) { return addFilterConditionInternal(FilterCondition( type: ConditionType.lt, include: include, property: 'estimate', value: value, )); } QueryBuilder<ProjectTask, ProjectTask, QAfterFilterCondition> estimateBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return addFilterConditionInternal(FilterCondition.between( property: 'estimate', lower: lower, includeLower: includeLower, upper: upper, includeUpper: includeUpper, )); } QueryBuilder<ProjectTask, ProjectTask, QAfterFilterCondition> idIsNull() { return addFilterConditionInternal(FilterCondition( type: ConditionType.isNull, property: 'id', value: null, )); } QueryBuilder<ProjectTask, ProjectTask, QAfterFilterCondition> idEqualTo( int value) { return addFilterConditionInternal(FilterCondition( type: ConditionType.eq, property: 'id', value: value, )); } QueryBuilder<ProjectTask, ProjectTask, QAfterFilterCondition> idGreaterThan( int value, { bool include = false, }) { return addFilterConditionInternal(FilterCondition( type: ConditionType.gt, include: include, property: 'id', value: value, )); } QueryBuilder<ProjectTask, ProjectTask, QAfterFilterCondition> idLessThan( int value, { bool include = false, }) { return addFilterConditionInternal(FilterCondition( type: ConditionType.lt, include: include, property: 'id', value: value, )); } QueryBuilder<ProjectTask, ProjectTask, QAfterFilterCondition> idBetween( int lower, int upper, { bool includeLower = true, bool includeUpper = true, }) { return addFilterConditionInternal(FilterCondition.between( property: 'id', lower: lower, includeLower: includeLower, upper: upper, includeUpper: includeUpper, )); } QueryBuilder<ProjectTask, ProjectTask, QAfterFilterCondition> nameEqualTo( String value, { bool caseSensitive = true, }) { return addFilterConditionInternal(FilterCondition( type: ConditionType.eq, property: 'name', value: value, caseSensitive: caseSensitive, )); } QueryBuilder<ProjectTask, ProjectTask, QAfterFilterCondition> nameGreaterThan( String value, { bool caseSensitive = true, bool include = false, }) { return addFilterConditionInternal(FilterCondition( type: ConditionType.gt, include: include, property: 'name', value: value, caseSensitive: caseSensitive, )); } QueryBuilder<ProjectTask, ProjectTask, QAfterFilterCondition> nameLessThan( String value, { bool caseSensitive = true, bool include = false, }) { return addFilterConditionInternal(FilterCondition( type: ConditionType.lt, include: include, property: 'name', value: value, caseSensitive: caseSensitive, )); } QueryBuilder<ProjectTask, ProjectTask, QAfterFilterCondition> nameBetween( String lower, String upper, { bool caseSensitive = true, bool includeLower = true, bool includeUpper = true, }) { return addFilterConditionInternal(FilterCondition.between( property: 'name', lower: lower, includeLower: includeLower, upper: upper, includeUpper: includeUpper, caseSensitive: caseSensitive, )); } QueryBuilder<ProjectTask, ProjectTask, QAfterFilterCondition> nameStartsWith( String value, { bool caseSensitive = true, }) { return addFilterConditionInternal(FilterCondition( type: ConditionType.startsWith, property: 'name', value: value, caseSensitive: caseSensitive, )); } QueryBuilder<ProjectTask, ProjectTask, QAfterFilterCondition> nameEndsWith( String value, { bool caseSensitive = true, }) { return addFilterConditionInternal(FilterCondition( type: ConditionType.endsWith, property: 'name', value: value, caseSensitive: caseSensitive, )); } QueryBuilder<ProjectTask, ProjectTask, QAfterFilterCondition> nameContains( String value, {bool caseSensitive = true}) { return addFilterConditionInternal(FilterCondition( type: ConditionType.contains, property: 'name', value: value, caseSensitive: caseSensitive, )); } QueryBuilder<ProjectTask, ProjectTask, QAfterFilterCondition> nameMatches( String pattern, {bool caseSensitive = true}) { return addFilterConditionInternal(FilterCondition( type: ConditionType.matches, property: 'name', value: pattern, caseSensitive: caseSensitive, )); } } extension ProjectTaskQueryLinks on QueryBuilder<ProjectTask, ProjectTask, QFilterCondition> {} extension ProjectTaskQueryWhereSortBy on QueryBuilder<ProjectTask, ProjectTask, QSortBy> { QueryBuilder<ProjectTask, ProjectTask, QAfterSortBy> sortByDate() { return addSortByInternal('date', Sort.asc); } QueryBuilder<ProjectTask, ProjectTask, QAfterSortBy> sortByDateDesc() { return addSortByInternal('date', Sort.desc); } QueryBuilder<ProjectTask, ProjectTask, QAfterSortBy> sortByDuration() { return addSortByInternal('duration', Sort.asc); } QueryBuilder<ProjectTask, ProjectTask, QAfterSortBy> sortByDurationDesc() { return addSortByInternal('duration', Sort.desc); } QueryBuilder<ProjectTask, ProjectTask, QAfterSortBy> sortByEstimate() { return addSortByInternal('estimate', Sort.asc); } QueryBuilder<ProjectTask, ProjectTask, QAfterSortBy> sortByEstimateDesc() { return addSortByInternal('estimate', Sort.desc); } QueryBuilder<ProjectTask, ProjectTask, QAfterSortBy> sortById() { return addSortByInternal('id', Sort.asc); } QueryBuilder<ProjectTask, ProjectTask, QAfterSortBy> sortByIdDesc() { return addSortByInternal('id', Sort.desc); } QueryBuilder<ProjectTask, ProjectTask, QAfterSortBy> sortByName() { return addSortByInternal('name', Sort.asc); } QueryBuilder<ProjectTask, ProjectTask, QAfterSortBy> sortByNameDesc() { return addSortByInternal('name', Sort.desc); } } extension ProjectTaskQueryWhereSortThenBy on QueryBuilder<ProjectTask, ProjectTask, QSortThenBy> { QueryBuilder<ProjectTask, ProjectTask, QAfterSortBy> thenByDate() { return addSortByInternal('date', Sort.asc); } QueryBuilder<ProjectTask, ProjectTask, QAfterSortBy> thenByDateDesc() { return addSortByInternal('date', Sort.desc); } QueryBuilder<ProjectTask, ProjectTask, QAfterSortBy> thenByDuration() { return addSortByInternal('duration', Sort.asc); } QueryBuilder<ProjectTask, ProjectTask, QAfterSortBy> thenByDurationDesc() { return addSortByInternal('duration', Sort.desc); } QueryBuilder<ProjectTask, ProjectTask, QAfterSortBy> thenByEstimate() { return addSortByInternal('estimate', Sort.asc); } QueryBuilder<ProjectTask, ProjectTask, QAfterSortBy> thenByEstimateDesc() { return addSortByInternal('estimate', Sort.desc); } QueryBuilder<ProjectTask, ProjectTask, QAfterSortBy> thenById() { return addSortByInternal('id', Sort.asc); } QueryBuilder<ProjectTask, ProjectTask, QAfterSortBy> thenByIdDesc() { return addSortByInternal('id', Sort.desc); } QueryBuilder<ProjectTask, ProjectTask, QAfterSortBy> thenByName() { return addSortByInternal('name', Sort.asc); } QueryBuilder<ProjectTask, ProjectTask, QAfterSortBy> thenByNameDesc() { return addSortByInternal('name', Sort.desc); } } extension ProjectTaskQueryWhereDistinct on QueryBuilder<ProjectTask, ProjectTask, QDistinct> { QueryBuilder<ProjectTask, ProjectTask, QDistinct> distinctByDate() { return addDistinctByInternal('date'); } QueryBuilder<ProjectTask, ProjectTask, QDistinct> distinctByDuration() { return addDistinctByInternal('duration'); } QueryBuilder<ProjectTask, ProjectTask, QDistinct> distinctByEstimate() { return addDistinctByInternal('estimate'); } QueryBuilder<ProjectTask, ProjectTask, QDistinct> distinctById() { return addDistinctByInternal('id'); } QueryBuilder<ProjectTask, ProjectTask, QDistinct> distinctByName( {bool caseSensitive = true}) { return addDistinctByInternal('name', caseSensitive: caseSensitive); } } extension ProjectTaskQueryProperty on QueryBuilder<ProjectTask, ProjectTask, QQueryProperty> { QueryBuilder<ProjectTask, DateTime, QQueryOperations> dateProperty() { return addPropertyNameInternal('date'); } QueryBuilder<ProjectTask, int, QQueryOperations> durationProperty() { return addPropertyNameInternal('duration'); } QueryBuilder<ProjectTask, int, QQueryOperations> estimateProperty() { return addPropertyNameInternal('estimate'); } QueryBuilder<ProjectTask, int?, QQueryOperations> idProperty() { return addPropertyNameInternal('id'); } QueryBuilder<ProjectTask, String, QQueryOperations> nameProperty() { return addPropertyNameInternal('name'); } }
0