mohsen
1 year ago
10 changed files with 174 additions and 50 deletions
-
2android/app/src/main/AndroidManifest.xml
-
3assets/languages/en.json
-
3assets/languages/fa.json
-
10data/data_core/local_db/local_db_core/test/widget_test.dart
-
85lib/features/main/main_screen.dart
-
6lib/features/posts/screen/posts_screen.dart
-
6lib/features/posts/widgets/filter_item_widget.dart
-
4lib/features/single_post/cubit/single_post_cubit.dart
-
46lib/features/single_post/screen/single_post_screen.dart
-
57lib/features/single_post/widget/author_comment_widget.dart
@ -1,10 +0,0 @@ |
|||
import 'package:flutter_test/flutter_test.dart'; |
|||
|
|||
void main() { |
|||
test('adds one to input values', () { |
|||
// final calculator = Calculator(); |
|||
// expect(calculator.addOne(2), 3); |
|||
// expect(calculator.addOne(-7), -6); |
|||
// expect(calculator.addOne(0), 1); |
|||
}); |
|||
} |
@ -0,0 +1,57 @@ |
|||
import 'package:flutter/material.dart'; |
|||
import 'package:sonnat/core/extensions/context_extension.dart'; |
|||
import 'package:sonnat/core/language/translator.dart'; |
|||
import 'package:sonnat/core/utils/app_constants.dart'; |
|||
|
|||
class AuthorCommentWidget extends StatefulWidget { |
|||
final TextEditingController controller; |
|||
|
|||
const AuthorCommentWidget({super.key, required this.controller}); |
|||
|
|||
@override |
|||
State<AuthorCommentWidget> createState() => _AuthorCommentWidgetState(); |
|||
} |
|||
|
|||
class _AuthorCommentWidgetState extends State<AuthorCommentWidget> { |
|||
|
|||
|
|||
@override |
|||
Widget build(BuildContext context) { |
|||
return SizedBox( |
|||
height: 49 * context.height / AppConstants.instance.appHeight, |
|||
child: TextFormField( |
|||
autofocus: false, |
|||
maxLength: 300, |
|||
controller: widget.controller, |
|||
maxLines: 10, |
|||
minLines: 4, |
|||
style: const TextStyle( |
|||
color: Color(0xff8D95AB), |
|||
fontSize: 10, |
|||
), |
|||
decoration: InputDecoration( |
|||
fillColor: Colors.transparent, |
|||
contentPadding: const EdgeInsets.symmetric( |
|||
vertical: 15, |
|||
horizontal: 18, |
|||
), |
|||
hintText: Translator.translate('full_name'), |
|||
filled: true, |
|||
counterText: '', |
|||
hintStyle: const TextStyle( |
|||
color: Color(0xff8D95AB), |
|||
fontSize: 10, |
|||
), |
|||
enabledBorder: OutlineInputBorder( |
|||
borderRadius: BorderRadius.circular(19), |
|||
borderSide: const BorderSide(color: Color(0xff636E88)), |
|||
), |
|||
focusedBorder: OutlineInputBorder( |
|||
borderRadius: BorderRadius.circular(19), |
|||
borderSide: const BorderSide(color: Color(0xff636E88)), |
|||
), |
|||
), |
|||
), |
|||
); |
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue