mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-04 04:04:18 +00:00 
			
		
		
		
	Use small add button
This commit is contained in:
		@@ -18,6 +18,12 @@ import 'package:flutter/material.dart';
 | 
				
			|||||||
/// @author Pierre HUBERT
 | 
					/// @author Pierre HUBERT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ConversationsListScreen extends StatefulWidget {
 | 
					class ConversationsListScreen extends StatefulWidget {
 | 
				
			||||||
 | 
					  final bool useSmallFAB;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  const ConversationsListScreen({Key key, this.useSmallFAB = false})
 | 
				
			||||||
 | 
					      : assert(useSmallFAB != null),
 | 
				
			||||||
 | 
					        super(key: key);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  State<StatefulWidget> createState() => _ConversationScreenState();
 | 
					  State<StatefulWidget> createState() => _ConversationScreenState();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -194,9 +200,10 @@ class _ConversationScreenState extends SafeState<ConversationsListScreen> {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        // Add conversation button
 | 
					        // Add conversation button
 | 
				
			||||||
        Positioned(
 | 
					        Positioned(
 | 
				
			||||||
          right: 20.0,
 | 
					          right: widget.useSmallFAB ? 5.0 : 20.0,
 | 
				
			||||||
          bottom: 20.0,
 | 
					          bottom: widget.useSmallFAB ? 5.0 : 20.0,
 | 
				
			||||||
          child: FloatingActionButton(
 | 
					          child: FloatingActionButton(
 | 
				
			||||||
 | 
					            mini: widget.useSmallFAB,
 | 
				
			||||||
            onPressed: () => _createConversation(),
 | 
					            onPressed: () => _createConversation(),
 | 
				
			||||||
            child: Icon(Icons.add),
 | 
					            child: Icon(Icons.add),
 | 
				
			||||||
          ),
 | 
					          ),
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -38,6 +38,6 @@ class _OpenConversationButtonState extends State<OpenConversationButton> {
 | 
				
			|||||||
      width: 300,
 | 
					      width: 300,
 | 
				
			||||||
      height: 500,
 | 
					      height: 500,
 | 
				
			||||||
      child: Card(
 | 
					      child: Card(
 | 
				
			||||||
        child: ConversationsListScreen(),
 | 
					        child: ConversationsListScreen(useSmallFAB: true),
 | 
				
			||||||
      ));
 | 
					      ));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user