Skip to content

Commit

Permalink
♻️ Refactor code.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhvanit-v-simformsolutions authored and DhvanitVaghani committed Feb 21, 2023
1 parent 9bfc77f commit 6aeeddb
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [1.2.0]
## [1.2.0+1]

* **Feat**: [42](https://github.com/SimformSolutionsPvtLtd/flutter_chatview/issues/42) Ability to
get callback on tap of profile circle avatar.
Expand Down
3 changes: 0 additions & 3 deletions lib/src/controller/chat_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import 'package:flutter/material.dart';
import '../models/models.dart';

class ChatController {

/// Represents initial message list in chat which can be add by user.
List<Message> initialMessageList;
ScrollController scrollController;
Expand All @@ -43,11 +42,9 @@ class ChatController {
/// Represents message stream of chat
StreamController<List<Message>> messageStreamController = StreamController();


/// Used to dispose stream.
void dispose() => messageStreamController.close();


/// Used to add message in message list.
void addMessage(Message message) {
initialMessageList.add(message);
Expand Down
2 changes: 0 additions & 2 deletions lib/src/extensions/extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import '../utils/constants.dart';
import '../utils/emoji_parser.dart';
import '../utils/package_strings.dart';


/// Extension for DateTime to get specific formats of dates and time.
extension TimeDifference on DateTime {
String get getDay {
Expand All @@ -51,7 +50,6 @@ extension TimeDifference on DateTime {
String get getTimeFromDateTime => DateFormat.Hm().format(this);
}


/// Extension on String which implements different types string validations.
extension ValidateString on String {
bool get isImageUrl {
Expand Down
1 change: 0 additions & 1 deletion lib/src/models/reply_message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import '../values/enumaration.dart';

class ReplyMessage {

/// Provides reply message.
final String message;

Expand Down
2 changes: 0 additions & 2 deletions lib/src/widgets/chat_groupedlist_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ class _ChatGroupedListWidgetState extends State<ChatGroupedListWidget>
}

void _initializeAnimation() {

// When this flag is on at that time only animation controllers will be
// initialized.
if (isEnableSwipeToSeeTime) {
Expand Down Expand Up @@ -239,7 +238,6 @@ class _ChatGroupedListWidgetState extends State<ChatGroupedListWidget>
}
}


/// When user swipe at that time only animation is assigned with value.
void _onHorizontalDrag(DragUpdateDetails details) {
_slideAnimation = Tween<Offset>(
Expand Down
1 change: 0 additions & 1 deletion lib/src/widgets/chat_view_appbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class ChatViewAppBar extends StatelessWidget {
this.showLeading = true,
}) : super(key: key);


/// Allow user to change colour of appbar.
final Color? backGroundColor;

Expand Down
1 change: 0 additions & 1 deletion lib/src/widgets/image_message_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ class ImageMessageView extends StatelessWidget {
this.highlightScale = 1.2,
}) : super(key: key);


/// Provides message instance of chat.
final Message message;

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: chatview
description: A Flutter package that allows you to integrate Chat View with highly customization options.
version: 1.2.0
version: 1.2.0+1
issue_tracker: https://github.com/SimformSolutionsPvtLtd/flutter_chatview/issues
repository: https://github.com/SimformSolutionsPvtLtd/flutter_chatview

Expand Down

0 comments on commit 6aeeddb

Please sign in to comment.